home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / DOS / TOOLS / DF_DEBUG.ZIP / DFDDOC.ARC / DFD.DOC
Encoding:
Text File  |  1988-09-14  |  133.5 KB  |  4,061 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.                                       DFD
  22.  
  23.                                     ┌────┐
  24.                                     │ GS │
  25.                                     └────┘
  26.  
  27.                               Data File Debugger
  28.  
  29.                             Version 1.10, May, 1987
  30.                          Version 1.20, September, 1988
  31.  
  32.  
  33.                  (C)Copyright Gilmore Systems - 1986,1987,1988
  34.  
  35.                               All rights reserved
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.                                 Gilmore Systems
  43.                                  P.O. Box 3831
  44.                          Beverly Hills, CA 90212-0831
  45.  
  46.                  Voice: (213) 275-8006   Data: (213) 276-5263
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.     First Printing: December, 1986
  56.     Second Printing: September, 1988
  57.  
  58.     Programs and documentation written by: Charles B. Gilmore
  59.                                            Gilmore Systems
  60.  
  61.     (C)Copyright Gilmore Systems - 1986, 1988
  62.  
  63.     All rights reserved
  64.  
  65.     No part  of this  publication may  be reproduced,  stored in a retrieval
  66.     system,  or  transmitted,  in  any  form  or  by  any means, electronic,
  67.     mechanical,  photocopying,  recording,  or  otherwise, without the prior
  68.     written permission of Gilmore Systems.
  69.  
  70.     The above  paragraph is  waived for  ver 1.20  when used  for evaluation
  71.     purposes only.
  72.  
  73.                                    Disclaimer
  74.  
  75.     Gilmore Systems makes no  representations or warranties with  respect to
  76.     the contents hereof and specifically disclaims any implied warranties of
  77.     merchantability or fitness for any particular purpose.  Further, Gilmore
  78.     Systems  reserves  the  right  to  revise  this  publication and to make
  79.     changes from time  to time in  the content hereof  without obligation of
  80.     Gilmore Systems to notify any  such person of such revision  or changes.
  81.     Under  no  circumstances  will  Gilmore  Systems  or  the author be held
  82.     responsible for any  consequential or inconsequential  damages resulting
  83.     from the use of any furnished programs or documentation.
  84.  
  85.                   C86 is a trademark of Computer Innovations.
  86.           IBM is a trademark of International Business Machines, Inc.
  87.         Microsoft and Microsoft Pascal are trademarks of Microsoft Corp.
  88.              Turbo Pascal is a trademark of Borland International.
  89.                 Turbo C is a trademark of Borland International.
  90.  
  91.  
  92.  
  93.  
  94.     Table of Contents                                                Page  1
  95.  
  96.  
  97.                                 TABLE OF CONTENTS
  98.  
  99.  
  100.     Table of Contents .................................................... 1
  101.  
  102.     DFD Overview ....................................................... 1-1
  103.          What is  DFD? ................................................. 1-2
  104.          What You Need ................................................. 1-3
  105.          Getting Started ............................................... 1-4
  106.  
  107.     Data Dictionaries .................................................. 2-1
  108.          Turbo Pascal .................................................. 2-2
  109.          Turbo Pascal - Comments ....................................... 2-6
  110.          Turbo Pascal - DAD "Tags" ..................................... 2-7
  111.          Turbo Pascal - Creating the DAD ............................... 2-9
  112.          Microsoft Pascal ............................................. 2-12
  113.          Microsoft Pascal - Additional Features ....................... 2-13
  114.          Borland's Turbo C, MS C and Computer Innovations C86 ("C") ... 2-14
  115.          Turbo C, MS C and Computer Innovations C86 ("C") - Comments .. 2-19
  116.          Turbo C, MS C and Computer Innovations C86 ("C") - DAD "Tags"  2-20
  117.          Turbo C, MS C and C86 ("C") - Creating the DAD ............... 2-22
  118.  
  119.     The Data File Debugger (DFD) Program - Using DFD ................... 3-1
  120.          Starting DFD .................................................. 3-2
  121.          Top Half of the DFD Display Screen ............................ 3-3
  122.          Bottom Half of DFD Display Screen ............................. 3-5
  123.          Bottom Half of DFD Display Screen - "Rec:" prompt ............. 3-6
  124.          Bottom Half of DFD Display Screen - "Subsc" prompt ............ 3-8
  125.          Bottom Half of DFD Display Screen - "D A T A" prompt .......... 3-9
  126.  
  127.     The Data File Debugger (DFD) Program - Advanced Section ............ 4-1
  128.          Dimensioned Variables ("Subsc" Prompt Field) .................. 4-2
  129.          Zapping (batch entry) ......................................... 4-3
  130.          Assignment Oriented Language (AOL) ............................ 4-4
  131.          Converting Data to Other Languages ............................ 4-6
  132.  
  133.     DAD Utility Programs ............................................... 5-1
  134.          DADSORT ....................................................... 5-2
  135.          DAD2SRCE ...................................................... 5-3
  136.          DADRPT ........................................................ 5-5
  137.          DADUNIQ ....................................................... 5-6
  138.  
  139.     DFD Demo - Walking Through the Demo ................................ A-1
  140.  
  141.     Index .............................................................. B-1
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  154.  
  155.  
  156.  
  157.     DFD Overview                                                   Page  1-1
  158.     What is  DFD?
  159.  
  160.  
  161.                           What is Data File Debugger?
  162.  
  163.     Data File Debugger (DFD) is a unique and powerful data file and database
  164.     debugging tool.  Most all application programs, whether their written in
  165.     C, Pascal, or any other language write their data to random files  which
  166.     have been described by a  record layout.  In Pascal, this  record layout
  167.     is described  by the  RECORD statement  and usually  consists of  nested
  168.     records and CASEs.  In C, the  record layout is described by the  STRUCT
  169.     statement, and usually consists of nested structs and UNIONs.  Likewise,
  170.     in BASIC,  records are  described by  the FIELD  statement, and in COBOL
  171.     they're described by a 01 level record in the Data Division.
  172.  
  173.     Although Pascal is Pascal,  and C is C,  the way different Pascal  and C
  174.     compilers generate code to store data into files varies from compiler to
  175.     compiler.  For instance,  Microsoft Pascal uses  IEEE standard for  real
  176.     numbers, whereas Borland's  Turbo Pascal uses  their own way  of storing
  177.     real numbers.  Microsoft  Pascal aligns data  items on word  boundaries,
  178.     whereas Turbo  Pascal does  not.  So  if you  were to  compile the  same
  179.     Pascal program under Microsft and Turbo Pascal, you'd find they wouldn't
  180.     be able to read each other's data.
  181.  
  182.     The  same  goes  for  different  C  compilers.  Computer Innovations C86
  183.     compiler  stores  it's  data  without  aligning  it  on word boundaries,
  184.     whereas Turbo C offers the  option of aligning data on  word boundaries.
  185.     Microsoft C defaults to word boundary alignment with the option of  byte
  186.     (packed) alignment.
  187.  
  188.     DFD supports Computer Innovations C86, Microsoft Pascal, Borland's Turbo
  189.     Pascal, Borland's Turbo C, and Microsoft C. Support for other  languages
  190.     will be developed if demand is high enough.
  191.  
  192.     DFD allows  you to  interactively display,  dump, modify,  zap, and fill
  193.     data elements in the  data file or database  by the same variable  names
  194.     that describe the record layout  in your source code.  Furthermore,  all
  195.     this is done in  ASCII string format, so  you don't have to  be familiar
  196.     with hexadecimal.  This  is especially helpful  for real numbers,  where
  197.     3.141592  or  2.314E-12  makes   much  more  sense  than   some  cryptic
  198.     hexadecimal  numbers.   DFD  converts  the  numbers  you type into their
  199.     proper   internal   representation,   and   converts   their    internal
  200.     representation to ASCII strings before displaying or dumping.
  201.  
  202.     DFD even lets you translate  data to and from different  languages.  For
  203.     instance, if you've written a  Turbo Pascal program that stores  tons of
  204.     data and need this data to be read and written by a Microsoft Pascal  or
  205.     Computer  Innovations  C  program  or  Turbo  C  program,  DFD  makes it
  206.     possible.  DFD can change data from one language format to another,  and
  207.     DFD  includes  a  semi  language  of  its  own called AOL for Assignment
  208.     Oriented Language.
  209.  
  210.     DFD works by  scanning your Pascal  or C source  code for the  RECORD or
  211.     STRUCT statement describing  your record layout.   It then makes  a data
  212.     dictionary containing all  the information it  needs to know  about your
  213.     datafile  such  as  offsets,  variable  names, types, lengths, etc.  DFD
  214.  
  215.  
  216.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  217.  
  218.  
  219.  
  220.     DFD Overview                                                   Page  1-2
  221.     What is  DFD?
  222.  
  223.  
  224.     supports up to 700 variable names  per datafile, up to 6 dimensions  per
  225.     array (7  in the  case of  strings in  C), up  to 1000  tag names (array
  226.     subscripts  that  have  been  "#define'd"  in  C or equated to values in
  227.     Pascal), and up to 700  comments.  Your RECORD or STRUCT  statements may
  228.     have nested (referenced) RECORD and STRUCT statements and CASE and UNION
  229.     statements.
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  280.  
  281.  
  282.  
  283.     DFD Overview                                                   Page  1-3
  284.     What You Need
  285.  
  286.  
  287.                                  What You Need
  288.  
  289.     DFD works on all IBM and  compatibles ranging from the XT to  the entire
  290.     PS/2 series  of microcomputers.   DFD was  designed to  work with  color
  291.     monitors - some  monochrome monitors may  not work properly  with DFD. A
  292.     fixed disk and  512K RAM is  recommended.  A printer  connected to LPT1.
  293.     You should also have a  copy of Borland's Turbo Pascal,  Borland's Turbo
  294.     C, Microsoft Pascal, Microsoft C, or Computer Innovation's C86  compiler
  295.     depending on which language you are using.
  296.  
  297.     DFD operates  under the  IBM PC-DOS  operating system  version 2.xx  and
  298.     above and all current versions of the MS-DOS operating systems.
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  343.  
  344.  
  345.  
  346.     DFD Overview                                                   Page  1-4
  347.     Getting Started
  348.  
  349.  
  350.                                 Getting Started
  351.  
  352.     For your convenience, the distribution disk is not copy protected.   The
  353.     first thing you should do is make a backup copy of the diskette with the
  354.     DOS  "diskcopy"  command.   When  this  is  done,  put  the distribution
  355.     diskette in a safe place, and use the backup copy only.
  356.  
  357.     To install DFD  on your hard  disk, place the  backup diskette you  made
  358.     into disk drive A:, shut the drive door, and enter the following:
  359.  
  360.                C:
  361.                MD  C:\DFD
  362.                CD  C:\DFD
  363.                COPY  A:\*.*  C:\DFD
  364.  
  365.     When this  is complete,  remove the  diskette from  drive A:  and put it
  366.     away.  Next take a  directory (DIR) of what  you've placed on your  hard
  367.     disk.   There  will  be  2  files  labeled  DFD.EXE  and  DFD.SCR in the
  368.     subdirectory along with some other files.  These two files comprise  the
  369.     DFD program.  The "other" files are:
  370.  
  371.     Include Files for C:
  372.  
  373.       PASTYPES.H   - "#include" with C programs. Use these data types.
  374.  
  375.     Scanner programs (Pass 1):
  376.  
  377.       PASSCAN.EXE  - Pascal scanner program.
  378.       CSCAN.EXE    - C scanner program.
  379.  
  380.     Dictionary Builders (Pass 2):
  381.  
  382.       MSPA2DAD.EXE - Dictionary Builder program for Microsoft Pascal.
  383.       TPAS2DAD.EXE - Dictionary Builder program for Borland's Turbo Pascal.
  384.       CIC2DAD.EXE  - Dictionary Builder program for Computer Innovations C.
  385.       TC2DAD.EXE   - Dictionary Builder program for Borland's Turbo and MS C
  386.  
  387.     Dictionary Utility Programs:
  388.  
  389.       DADRPT.EXE   - Utility program to produce a report of a dictionary.
  390.       DADSORT.EXE  - Utility program to alphabetically sort a dictionary.
  391.       DADUNIQ.EXE  - Utility program to make duplicate member names unique.
  392.       DAD2SRCE.EXE - Utility program to make source code from a dictionary.
  393.  
  394.     Demo Files:
  395.  
  396.       DEMO.REC     - Demo source file for Turbo Pascal
  397.       DEMO.DB      - Demo database (data file) for Turbo Pascal
  398.  
  399.     Read or print this file:
  400.  
  401.       READ.ME      - Latest information not in this user's manual.
  402.  
  403.  
  404.  
  405.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  406.  
  407.  
  408.  
  409.     Data Dictionaries                                              Page  2-1
  410.     Concept
  411.  
  412.  
  413.                            Data Dictionaries Defined
  414.  
  415.     A  data  dictionary  is  a  direct  access or random file which contains
  416.     information about  your data  file or  database layout.   The DFD system
  417.     creates data dictionaries (files with an extension of ".DAD") from  your
  418.     source code.  These DAD  (DAta Dictionary) files contain  symbol tables,
  419.     offsets,  variable  types,  and  other  kinds  of information about your
  420.     database.   DFD  works  with  these  DADs  to  determine  exactly  where
  421.     everything in the database is  located - by variable name.   Your record
  422.     layout is limited to describe a  maximum 64K of data, however, the  data
  423.     file or database has no limitation - data files or databases are usually
  424.     repetitions of your record layout and can therefore be much larger  than
  425.     you could fit on your fixed disk.
  426.  
  427.     DADs are the universal language of DFD. Whether your data is stored from
  428.     a Pascal or C program DFD knows just how to interpret and manipulate it.
  429.  
  430.     To  create  a  DAD,  you  must  first  translate  your source code to an
  431.     intermediate type of source language.  This is done by a Scanner program
  432.     - either  PASSCAN.EXE for  Pascal, or  CSCAN.EXE for  C programs.   This
  433.     intermediate source file is then used as input to the Dictionary Builder
  434.     Program which creates the  DAD. Dictionary Builders currently  available
  435.     are for Microsoft Pascal,  Borland's Turbo Pascal, Computer  Innovations
  436.     "C86" C compiler, and Borland's Turbo C compiler.
  437.  
  438.     The rest of this section  deals with different languages and  compilers,
  439.     and the syntax the scanner  programs expect you to follow.   Though they
  440.     follow the standards  of the language  you're programming in,  they have
  441.     stricter rules  and tend  to be  a little  less lenient  than an  actual
  442.     compiler.
  443.  
  444.     The  scanner   and  DAD   builder  programs   operate  on   TYPEs,  more
  445.     specifically, RECORD types for Pascal, and STRUCT types for C.
  446.  
  447.     Whenever you build  a data dictionary,  the dictionary builder  programs
  448.     report the  size of  the structures  or records.   It is  a good idea to
  449.     write a short  program to print  the size of  the structures or  records
  450.     you're using to make sure that your compiler and the dictionary  builder
  451.     both agree on these sizes, if they don't you've done something wrong.
  452.  
  453.     Note that  the Scanner  Programs produce  an intermediate  file with  an
  454.     extension of ".RRR",  and the DAD  builder programs produce  three files
  455.     with extensions of ".DAD", ".TAD", and ".KAD". These three files are the
  456.     ones that are used by the DFD program.
  457.  
  458.     ".DAD" files are the data dictionary files themselves.  ".TAD" files are
  459.     the Tag dictionary  files, and ".KAD"  files are the  comment dictionary
  460.     files (named ".kad" so as  not to interfere with cad/cam  programs using
  461.     an extension of ".cad", and to keep the convention of *.?ad straight).
  462.  
  463.     Note that if a DAD builder program finds an error, it refers to the line
  464.     number of the intermediate file - the file with an extension of ".RRR".
  465.  
  466.  
  467.  
  468.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  469.  
  470.  
  471.  
  472.     Data Dictionaries                                              Page  2-2
  473.     Turbo Pascal
  474.  
  475.  
  476.                          Syntax for Turbo Pascal Users
  477.  
  478.     Since the scanner program is not a compiler, you should edit your source
  479.     files and  remove all  code except  for RECORD  statements.  The scanner
  480.     ignores code and only looks for RECORD statements.  The presence of code
  481.     slows the process down.
  482.  
  483.     The  Turbo  Pascal  DAD  builder  understands  the following scalar data
  484.     types:
  485.  
  486.        INTEGER
  487.        LONGINT
  488.        BYTE
  489.        REAL
  490.        BOOLEAN
  491.        CHAR
  492.  
  493.     and the type:
  494.  
  495.        STRING
  496.  
  497.     It also understands the type:
  498.  
  499.        RECORD
  500.  
  501.     and the variant type:
  502.  
  503.        CASE
  504.  
  505.     Any of  the scalar  types, and  the STRING  type can  be dimensioned (an
  506.     array) up to 6 dimensions as in the following example:
  507.  
  508.           TEST1 : ARRAY[1..5,4..10,3..10,1..10,2..8,0..1] of INTEGER;
  509.  
  510.     Also, a variable reffering  to a RECORD type  can be dimensioned by  the
  511.     same rules:
  512.  
  513.  
  514.           ABC = RECORD
  515.                 A : BYTE;
  516.                 B : ARRAY[1..6,3..9] OF STRING[10];
  517.                 C : REAL;
  518.           END;
  519.  
  520.           DEF = RECORD
  521.                 D : ARRAY[1..4,2..6] OF ABC;
  522.                 E : CHAR;
  523.                 F : INTEGER;
  524.           END;
  525.  
  526.  
  527.     In the above example, DEF.D is  a two-dimensional array of type ABC.  In
  528.     this fashion, the ABC  record is treated as  an array of 20  ABC records
  529.  
  530.  
  531.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  532.  
  533.  
  534.  
  535.     Data Dictionaries                                              Page  2-3
  536.     Turbo Pascal
  537.  
  538.  
  539.     when referenced by DEF.D[x,y], therefore, DEF.D[x,y] in this example  is
  540.     a REFERENCE to another record (where x and y are subscripts).
  541.  
  542.     Note: If you're using Microsoft Pascal, STRING[10] is equivalent to
  543.           LSTRING(10), and all STRING types in this section are equivalent
  544.           to LSTRING types in Microsoft Pascal. See the section on
  545.           Microsoft Pascal for additional data types and features not
  546.           covered in this Turbo Pascal section.
  547.  
  548.     Variable Names are significant to 31 characters and should start with an
  549.     alphabetic character.
  550.  
  551.     Important: All variable declarations are one per line. That is, you
  552.                cannot do:
  553.  
  554.                     a,b,c : integer;       {wrong}
  555.  
  556.                or
  557.  
  558.                     a,                     {wrong}
  559.                     b,                     {wrong}
  560.                     c     : integer;       {wrong}
  561.  
  562.                you must do:
  563.  
  564.                     a   : integer;         {correct}
  565.                     b   : integer;         {correct}
  566.                     c   : integer;         {correct}
  567.  
  568.     Comments are understood by the Scanner with the 3 following rules:
  569.  
  570.        1 - Only "{" and "}" are recognized as comments. "(*" and "*)" are
  571.            invalid and should be changed to the curly bracket types.
  572.  
  573.        2 - Both the "{" and "}" must appear on the same line! Comments
  574.            cannot be split among multiple lines.
  575.  
  576.        3 - Nested comments (comments within comments) are not allowed.
  577.  
  578.  
  579.     Array subscript ranges must be positive whole numbers, or DAD "TAGS".
  580.     DAD "TAGS" will be explained later.
  581.  
  582.     A maximum of 700 variable names, (including RECORD names) are allowed.
  583.  
  584.     Nested  RECORDS  are  allowed  by  REFERENCE  only.  In other words, a
  585.     RECORD must NOT have another RECORD statement in it, but it can REFER to
  586.     another record type such as the DEF.D record refers to the ABC record in
  587.     the previous example.
  588.  
  589.     CASE syntax (variant part of a RECORD) is somewhat different than  the
  590.     normal syntax.  It consists of the word CASE on a single line.  The tag,
  591.     type, and "of" are ignored.  The "(" and ")" parts are to be on lines by
  592.  
  593.  
  594.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  595.  
  596.  
  597.  
  598.     Data Dictionaries                                              Page  2-4
  599.     Turbo Pascal
  600.  
  601.  
  602.     themselves.  The following example may help clarify this:
  603.  
  604.           Name = record
  605.                  FamilyName     : string[32];
  606.                  ChristianNames : array[1..3] of string[16];
  607.           end;
  608.  
  609.           Date = record
  610.                  Day   : byte;
  611.                  Month : byte;
  612.                  Year  : integer;
  613.           end;
  614.  
  615.           Person=record
  616.                  PersonName : Name;
  617.                  Birthdate  : Date;
  618.                  CASE
  619.                     citizen:
  620.                        (
  621.                        BirthPlace : Name;
  622.                        )
  623.                     Alien:
  624.                        (
  625.                        CountryOfOrigin : Name;
  626.                        DateOfEntry     : Date;
  627.                        PermittedUntil  : Date;
  628.                        PortOfEntry     : Name;
  629.                        )
  630.           End;
  631.  
  632.     Note that  the above  example is  taken from  the Turbo Pascal Reference
  633.     Manual.  Also note that the Date  record in this example does not  match
  634.     the Date record in the  Turbo Pascal Reference Manual.  This  is because
  635.     the dictionary builder is not a compiler, and therefore only understands
  636.     standard SCALAR and STRING data types.  In case you don't have the Turbo
  637.     Pascal Reference Manual  handy, their version  of the date  record is as
  638.     follows:
  639.  
  640.           Date = record
  641.                  Day   : 1..31;
  642.                  Month : (Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec);
  643.                  Year  : 1900..1999;
  644.           end;
  645.  
  646.     Reiterating,  the  syntax  the  scanner  and  dictionary  builders   are
  647.     expecting for these kinds of records are (via example):
  648.  
  649.           Date = record
  650.                  Day   : byte;
  651.                  Month : byte;
  652.                  Year  : integer;
  653.           end;
  654.  
  655.  
  656.  
  657.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  658.  
  659.  
  660.  
  661.     Data Dictionaries                                              Page  2-5
  662.     Turbo Pascal
  663.  
  664.  
  665.     Note how everything is converted  to their standard scalar types.   User
  666.     defined scalars and subranges are  not supported, since the DAD  builder
  667.     only needs to know  about standard data types.   Subranges of up to  256
  668.     elements  are  of  the  "byte"  type,  and  higher  than  256 are of the
  669.     "integer" type.
  670.  
  671.     One  final  note  is  that  "SOMENAME=RECORD"  must  appear on a line by
  672.     itself, and "END;" must also appear on a line by itself.
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  721.  
  722.  
  723.  
  724.     Data Dictionaries                                              Page  2-6
  725.     Turbo Pascal - Comments
  726.  
  727.  
  728.  
  729.     Comments
  730.  
  731.     As mentioned earlier,  comments are of  the curly bracket  type ("{" and
  732.     "}").  Each comment must appear on  a single line and not split  accross
  733.     multiple lines.  Comments must not be nested (comment within a comment).
  734.  
  735.     As the compiler uses metacommands or compiler directives within comments
  736.     (these are ignored by the scanner and DAD builder programs), the scanner
  737.     and DAD builder programs will also remember your comments.  To  remember
  738.     your comments, they sould appear after the semicolon of standard  scalar
  739.     types as follows:
  740.  
  741.          Phone : string[10];    { This is for your phone number }
  742.          ID    : integer;       { Holds your user id }
  743.  
  744.     Comments should be no longer than 80 character in length.
  745.  
  746.     As  another  feature,  comments  of  this  type  beginning  with  2  "#"
  747.     characters, will be ignored by DFD (data file debugger).  As an example:
  748.  
  749.          Phone : string[10];    { This is for your phone number }
  750.          ID    : integer;       {## Holds your user id }
  751.  
  752.     When DFD lists your variables, ID will not be listed.  Therefore, ID  is
  753.     not accessible to  the DFD user  for modification, listing,  or anything
  754.     else.   This  is  sort  of  a  built-in  protection DFD offers by making
  755.     certain fields unavailable  to the user.   Make sure the  "#" characters
  756.     are the first 2 characters immediately following the left curly bracket.
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  784.  
  785.  
  786.  
  787.     Data Dictionaries                                              Page  2-7
  788.     Turbo Pascal - DAD "Tags"
  789.  
  790.  
  791.  
  792.     When  working  with  arrays,  it  is  sometimes more convenient to use a
  793.     descriptive name for the subscript range rather than a range of numbers.
  794.     This is allowed with the "{#START_SET}" and "{#END_SET}" DAD directives.
  795.     The names come from "Start defining a set of tags", and "End defining  a
  796.     set of tags".  Do not get  the words "set" and "tags" confused  with the
  797.     standard  Pascal  meanings  of  these  words.   An Example would help to
  798.     clarify this:
  799.  
  800.          {#START_SET}
  801.  
  802.          MONTH=1..12;
  803.          YEAR=1900..2000;
  804.          DAY=1..7;
  805.          HOUR=1..24;
  806.  
  807.          {#END_SET}
  808.  
  809.          Info = Record
  810.                 MonthTable : array[MONTH]          of string[9];
  811.                 YearTable  : array[YEAR]           of integer;
  812.                 DayTable   : array[DAY]            of byte;
  813.                 HourTable  : array[HOUR]           of byte;
  814.                 MmDdYy     : array[MONTH,DAY,YEAR] of string[20];
  815.          end;
  816.  
  817.  
  818.     With this  method, DFD  will prompt  you for  subscripts using something
  819.     like "MONTH (1 to 12)", rather than just "(1 to 12)".
  820.  
  821.     The above example is equivalent to the following:
  822.  
  823.          Info = Record
  824.                 MonthTable : array[1..12]                 of string[9];
  825.                 YearTable  : array[1900..2000]            of integer;
  826.                 DayTable   : array[1..7]                  of byte;
  827.                 HourTable  : array[1..24]                 of byte;
  828.                 MmDdYy     : array[1..12,1..7,1900..2000] of string[20];
  829.          end;
  830.  
  831.  
  832.     The rules for defining DAD TAG's are simple:
  833.  
  834.          - No more than 1000 DAD TAG's can be defined in any given source
  835.            record.
  836.  
  837.          - TAG names can be a maximum of 15 characters in length and should
  838.            begin with a letter of the alphabet.
  839.  
  840.          - The TAG name should start in column 1, be followed immediately by
  841.            an "=" character, and the "=" character should be followed
  842.            immediately by one (and one only) range.
  843.  
  844.  
  845.  
  846.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  847.  
  848.  
  849.  
  850.     Data Dictionaries                                              Page  2-8
  851.     Turbo Pascal - DAD "Tags"
  852.  
  853.  
  854.          - The TAG range must contain whole numbers - no real or negative
  855.            numbers are allowed.
  856.  
  857.          - Do Not forget to start TAG descriptions without a {#START_SET}
  858.            and end them with a {#END_SET} or they will be ignored. The
  859.            scanner only looks for and processes RECORD statements unless it
  860.            finds these directives!
  861.  
  862.  
  863.     Once a set of TAG's have been defined, you may use them freely  anywhere
  864.     an array subscript range can be used (as in the above example).
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  910.  
  911.  
  912.  
  913.     Data Dictionaries                                              Page  2-9
  914.     Turbo Pascal - Creating the DAD
  915.  
  916.  
  917.  
  918.     Creating the DAD
  919.  
  920.     There are two steps two creating the  DAD. The first step is to run  the
  921.     scanner  program.   The  scanner  translates  your  source  code into an
  922.     intermediate file with an extension  of ".RRR".  So if your  source code
  923.     filename  is  "TEST.PAS"  or  "TEST.REC",  the  scanner  will  create an
  924.     intermediate file with a filename of "TEST.RRR".
  925.  
  926.     The syntax for using the Scanner is:
  927.  
  928.              PASSCAN  TEST.PAS  PERSON
  929.  
  930.     Here we assume that TEST.PAS in the name of your source file, but it can
  931.     be anything you like.  We also assume that the name of your main  RECORD
  932.     statement is  PERSON in  this example,  however it  could have  been any
  933.     record name that happens to be the main record of your program.
  934.  
  935.     The TEST.PAS source file might look something like this:
  936.  
  937.  
  938.          {#START_SET}
  939.  
  940.          CHRISTIAN_NAMES=1..3; {Don't forget - Maximum of 15-char TAG name}
  941.  
  942.          {#END_SET}
  943.  
  944.           Name = record
  945.                  FamilyName     : string[32];
  946.                  ChristianNames : array[CHRISTIAN_NAMES] of string[16];
  947.           end;
  948.  
  949.           Date = record
  950.                  Day   : byte;            { Day of week   }
  951.                  Month : byte;            { Month of Year }
  952.                  Year  : integer;         { Year          }
  953.           end;
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  973.  
  974.  
  975.  
  976.     Data Dictionaries                                             Page  2-10
  977.     Turbo Pascal - Creating the DAD
  978.  
  979.  
  980.  
  981.           Person=record
  982.                  PersonName : Name;
  983.                  Birthdate  : Date;
  984.                  CASE
  985.                     citizen:
  986.                        (
  987.                        BirthPlace : Name;
  988.                        )
  989.                     Alien:
  990.                        (
  991.                        CountryOfOrigin : Name;
  992.                        DateOfEntry     : Date;
  993.                        PermittedUntil  : Date;
  994.                        PortOfEntry     : Name;
  995.                        )
  996.           End;
  997.  
  998.  
  999.     If any errors are reported, you must correct them before running the DAD
  1000.     builder program.
  1001.  
  1002.     If all goes well, you can now run the DAD builder program:
  1003.  
  1004.           TPAS2DAD  TEST
  1005.  
  1006.     NOTE: If you're using Microsoft Pascal, use the Microsoft Pascal DAD
  1007.           Builder Program:
  1008.  
  1009.           MSPA2DAD  TEST
  1010.  
  1011.     Do not supply a filename  extension, as it will automatically  assume an
  1012.     extension of ".RRR".  In the above example, the DAD builder program will
  1013.     look for the file TEST.RRR.
  1014.  
  1015.     If the DAD  builder program detects  any errors, it  refers to the  line
  1016.     number in the ".RRR" file.  You  should look at the line number  in that
  1017.     file to determine  where in your  real file (ie:  TEST.PAS) to look  for
  1018.     your error.
  1019.  
  1020.     When the DAD builder program finishes, it will print the number of bytes
  1021.     of  each  RECORD  it  finds,  and  these  numbers  should be checked for
  1022.     accuracy.  One way to  do this is to  write a quick program  that prints
  1023.     the sizes of each of the RECORDs and make certain these numbers match.
  1024.  
  1025.     DO NOT  EVER ATTEMPT  TO RUN  DFD WITH  YOUR DICTIONARIES UNLESS THESE
  1026.     NUMBERS MATCH!!! - YOU COULD DESTROY YOUR DATA!!!
  1027.  
  1028.     The  exception  to  this  rule  comes  with  Microsoft  Pascal (or other
  1029.     languages that align  their data on  word boundaries).  The  DAD builder
  1030.     program prints  record sizes  exactly and  Microsoft Pascal  will always
  1031.     report these sizes as an even number of bytes.  So in the case that  the
  1032.     DAD builder  reports a  record as  being 17  bytes and  Microsoft Pascal
  1033.  
  1034.  
  1035.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  1036.  
  1037.  
  1038.  
  1039.     Data Dictionaries                                             Page  2-11
  1040.     Turbo Pascal - Creating the DAD
  1041.  
  1042.  
  1043.     reports it as being 18  bytes, you're still ok ...Microsoft  merely adds
  1044.     this extra byte to  make it an even  number - DFD does  take this into
  1045.     account.
  1046.  
  1047.     If the numbers match - congratulations!  You're now ready to run the DFD
  1048.     program and do all kinds of things to your datafiles or databases.   You
  1049.     may now go to the section on using DFD, but before you do, you should be
  1050.     aware of one  more thing.  Since  Pascal, unlike C,  allows you to  have
  1051.     duplicate member names in different records, you will have to make those
  1052.     names unique so that no one variable name appears more than once.  Don't
  1053.     worry - you won't have to use an editor and painfully change  everything
  1054.     by hand.  You  can use the  DAD utility program  DADUNIQ to do  this for
  1055.     you.  To accomplish this, you'll want to run the utility program on  the
  1056.     dictionary you've just created:
  1057.  
  1058.             DADUNIQ  TEST
  1059.  
  1060.     Do not supply  an extension because  this utility program  automatically
  1061.     appends ".DAD" to  the name and  searches for TEST.DAD  in this example.
  1062.  
  1063.     Variable names must be unique otherwise there will be no guarantee as to
  1064.     just which variable you are referring to when you are in DFD.
  1065.  
  1066.     The unique names this utility makes will be transparent to you since  it
  1067.     uses invisible characters, and will therefore appear to be unchanged  to
  1068.     you when in the DFD program.   In most cases, this utility program  will
  1069.     run successfully, but occasionally it will fail if your duplicate member
  1070.     names are close to the  31-character limit.  If you have  a 28-character
  1071.     variable name (member  name) that appears  4 times, the  DADUNIQ program
  1072.     will run successfully, but if it  appears 5 or more times, DADUNIQ  will
  1073.     fail.   The  reason  for  this  is  because DADUNIQ makes variable names
  1074.     unique by  appending 1  invisible character  to the  2nd occurrence of a
  1075.     variable name, bringing  the name to  29-characters, the 3rd  occurrence
  1076.     makes it 30 characters  long, the 4th 31  characters, and the 5th  would
  1077.     put it over the limit. DADUNIQ will alert you if this happens.
  1078.  
  1079.     If you're using Microsoft Pascal and  were told to read this section  on
  1080.     Turbo Pascal, you may now go back to the section on Microsoft Pascal for
  1081.     additional information on features not supported by Turbo Pascal.
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  1099.  
  1100.  
  1101.  
  1102.     Data Dictionaries                                             Page  2-12
  1103.     Microsoft Pascal
  1104.  
  1105.  
  1106.  
  1107.                                 Microsoft Pascal
  1108.  
  1109.     If  you  haven't  read  the  section  on  Turbo Pascal, please read that
  1110.     section now.   Microsoft Pascal  follows the  same conventions  as Turbo
  1111.     Pascal with a few additional features.  When you've finished reading the
  1112.     section on  Turbo Pascal,  you may  then come  back to  this section and
  1113.     continue on  the features  and additional  support for  Microsoft Pascal
  1114.     users.
  1115.  
  1116.         Please read the section on Turbo Pascal now!
  1117.  
  1118.     Now that you've read  the section on Turbo  Pascal, here is the  list of
  1119.     the scalar data types that Microsoft Pascal supports:
  1120.  
  1121.         SINT
  1122.         BOOLEAN
  1123.         BYTE
  1124.         CHAR
  1125.         WORD
  1126.         INTEGER4
  1127.         INTEGER
  1128.         REAL8
  1129.         REAL
  1130.  
  1131.     Microsoft Pascal also understands the types:
  1132.  
  1133.         LSTRING   (same as Turbo Pascal STRING)
  1134.         STRING    (an array of characters - not a variable length string)
  1135.  
  1136.     and of course:
  1137.  
  1138.         RECORD
  1139.         CASE
  1140.  
  1141.     Note that while Turbo Pascal uses variable length strings of the form:
  1142.  
  1143.         NAME : STRING[10];
  1144.  
  1145.     Microsoft's equivalent is:
  1146.  
  1147.         NAME : LSTRING(10);
  1148.  
  1149.     Everything else discussed in the section on Turbo Pascal also applies to
  1150.     Microsoft Pascal, except that Microsoft Pascal has the additional scalar
  1151.     data  types  that  Turbo  Pascal  doesn't  have.   These are SINT, WORD,
  1152.     INTEGER4, REAL8, LSTRING (same as Turbo's STRING) and STRING.
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  1162.  
  1163.  
  1164.  
  1165.     Data Dictionaries                                             Page  2-13
  1166.     Microsoft Pascal - Additional Features
  1167.  
  1168.  
  1169.  
  1170.     Microsoft  Pascal  has  some  additional  features  not present in Turbo
  1171.     Pascal.  These additional features have also been incorporated into  the
  1172.     DAD builder for Microsoft Pascal.
  1173.  
  1174.     Comments
  1175.  
  1176.     In addition to the curly brackets  "{" and "}" to delimit comments,  you
  1177.     may use an exclamation mark ("!") to indicate a comment.  The "!"  means
  1178.     that the entire line of source code from that point on is to be  treated
  1179.     as a comment.  Also  note that just like  the Turbo Pascal DAD  builder,
  1180.     the older  "(*" and  "*)" delimiters  of comments  are not  detected and
  1181.     should be changed to the "{" and "}" curly brackets.
  1182.  
  1183.     Bracketed Offsets
  1184.  
  1185.     Microsoft  Pascal  also  offers  bracketed  offsets  not  found in Turbo
  1186.     Pascal.  Most  people don't  know of  them, nor  do they  use them.  But
  1187.     where space is vital, or something absolutely has to start at a  certain
  1188.     offset,  the  DAD  builder  will  also  support these bracketed offsets.
  1189.     Basically, bracketed offsets  allow the programmer  to override the  way
  1190.     Microsoft Pascal aligns everything on  word boundaries.  Once you use  a
  1191.     bracketed offset in Microsoft Pascal, you must always use it.  You  must
  1192.     also access the  data in a  certain fashion or  you may overwrite  other
  1193.     data - Consult your Microsoft Pascal user's manual for more details  and
  1194.     remember to follow it's conventions when using DFD.
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  1225.  
  1226.  
  1227.  
  1228.     Data Dictionaries                                             Page  2-14
  1229.     Borland's Turbo C, MS C and Computer Innovations C86 ("C")
  1230.  
  1231.  
  1232.  
  1233.     Since the scanner program is not a compiler, you should edit your source
  1234.     files and  remove all  code except  for STRUCT  statements.  The scanner
  1235.     ignores code and only looks for STRUCT statements.  The presence of code
  1236.     slows the process down.
  1237.  
  1238.     The datatypes that the C DAD  builders understand have been set up  in a
  1239.     file of "#define's" in the  file "pastypes.h" on the distrubution  disk.
  1240.     You will want to copy or "#include" this file with your source file.
  1241.  
  1242.     The  Computer  Innovations  "C"  (hereinafter  reffered to as "C86")
  1243.     and Turbo C DAD builders understand the following scalar data types:
  1244.  
  1245.        unsigned int      (or can use WORD)
  1246.        int               (or can use INTEGER)
  1247.        unsigned long     (or can use UNSLONG)
  1248.        long              (or can use INTEGER4)
  1249.        float             (or can use REAL)
  1250.        double            (or can use REAL8)
  1251.  
  1252.     Since  there  are  so  many  different  ways  to  use the type "char" or
  1253.     "unsigned char", the DAD builder has eliminated the data type altogether
  1254.     and replaced it with the following data types:
  1255.  
  1256.         SINT     - signed char (values of -127 to 127)
  1257.         BOOL     - unsigned char (can take a value of 0 or 1)
  1258.         BYTE     - unsigned char (can take a value of 0 to 255)
  1259.         CHAR     - unsigned char (can hold ASCII character values)
  1260.         ZSTRING  - unsigned char (ASCII Z-string - variable length string)
  1261.         STRING   - unsigned char (holds a string of chars - fixed length)
  1262.  
  1263.     It also understands:
  1264.  
  1265.        struct
  1266.  
  1267.     and the variant type:
  1268.  
  1269.        union
  1270.  
  1271.     Any  of  the  scalar  types,  and  the  different character types can be
  1272.     dimensioned (an array) up to 6 dimensions as in the following example:
  1273.  
  1274.           int test1[5][10][6][4][8][2];
  1275.  
  1276.                 or
  1277.  
  1278.           INTEGER test1[5][10][6][4][8][2];
  1279.  
  1280.     Also, a variable reffering  to a STRUCT type  can be dimensioned by  the
  1281.     same rules:
  1282.  
  1283.  
  1284.           struct abc {
  1285.  
  1286.  
  1287.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  1288.  
  1289.  
  1290.  
  1291.     Data Dictionaries                                             Page  2-15
  1292.     Borland's Turbo C, MS C and Computer Innovations C86 ("C")
  1293.  
  1294.  
  1295.                      byte    a;
  1296.                      ZSTRING b[6][7][10];
  1297.                      float   c;
  1298.                      };
  1299.  
  1300.           struct def {
  1301.                      struct abc d[4][5];
  1302.                      CHAR       e;
  1303.                      int        f;
  1304.                      };
  1305.  
  1306.  
  1307.     In the above example, def.d is a two-dimensional array of type abc.   In
  1308.     this fashion, the abc  record is treated as  an array of 20  abc records
  1309.     when referenced by def.d[x][y],  therefore, def.d[x][y] in this  example
  1310.     is a REFERENCE to another record (where x and y are subscripts).
  1311.  
  1312.     Variable Names are significant to 31 characters and should start with an
  1313.     alphabetic character.
  1314.  
  1315.     Important: All variable declarations are one per line. That is, you
  1316.                cannot do:
  1317.  
  1318.                     int a,b,c;            /* wrong */
  1319.  
  1320.                or
  1321.  
  1322.                     int a,                /* wrong */
  1323.                         b,                /* wrong */
  1324.                         c;                /* wrong */
  1325.  
  1326.                you must do:
  1327.  
  1328.                     int a;                /* correct */
  1329.                     int b;                /* correct */
  1330.                     int c;                /* correct */
  1331.  
  1332.     With two of the new data  types introduced above, STRING and ZSTRING,  a
  1333.     variable can actually have up to 7 dimensions instead of the limit of  6
  1334.     imposed above.  The reason is that STRING and ZSTRING refer to a  string
  1335.     of  one  or  more  characters.   This  means  that  you  still  have the
  1336.     limitation  of  6  dimensions,  but  the  last  dimension (or 7th in the
  1337.     maximum case) tells just how many characters the variable is supposed to
  1338.     be a string of.
  1339.  
  1340.     The ZSTRING type  refers to your  standard null-terminated string  (also
  1341.     known as an  ascii zstring).  So  if you want  to have a  maximum of ten
  1342.     characters  in  a  variable  length  string,  it  should  be declared as
  1343.     "ZSTRING somename[11];" in order to accomodate the null byte at the  end
  1344.     of the string.   "ZSTRING somename[5][5][11];" declares  a 2-dimensional
  1345.     (5 by 5)  variable length strings  with a length  of 10 characters  each
  1346.     (plus an extra for the null byte at the end).
  1347.  
  1348.  
  1349.  
  1350.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  1351.  
  1352.  
  1353.  
  1354.     Data Dictionaries                                             Page  2-16
  1355.     Borland's Turbo C, MS C and Computer Innovations C86 ("C")
  1356.  
  1357.  
  1358.     The STRING type  might not get  any use, but  it defines a  fixed length
  1359.     string and is not null terminated.  Therefore, "STRING somename[10];" is
  1360.     a declaration of a 10-character  fixed length string.  There is  no null
  1361.     byte.
  1362.  
  1363.     Variable Names are significant to 31 characters and should start with an
  1364.     alphabetic character.
  1365.  
  1366.     Comments are understood by the Scanner with the 3 following rules:
  1367.  
  1368.        1 - Only "/*" and "*/" are recognized as comments.
  1369.  
  1370.        2 - Both the "/*" and "*/" must appear on the same line! Comments
  1371.            cannot be split among multiple lines.
  1372.  
  1373.        3 - Nested comments (comments within comments) are not allowed.
  1374.  
  1375.  
  1376.     Array subscript declarations  must be positive  whole numbers, or  DAD
  1377.     "TAGS".  DAD "TAGS" will be explained later.
  1378.  
  1379.     A maximum of 700 variable names, (including STRUCT names) are allowed.
  1380.  
  1381.     Nested  STRUCTS  are  allowed  by  REFERENCE  only.  In other words, a
  1382.     STRUCT must NOT have another STRUCT type ("struct somename {" or "struct
  1383.     {") in it,  but it can  REFER to another  record type such  as the def.d
  1384.     record refers to the abc record in the previous example.  The  exception
  1385.     to the appearance of  a "struct {" within  a struct type is  when UNIONs
  1386.     are involved.
  1387.  
  1388.     UNION syntax  is somewhat  different than  the normal  syntax.  It  is
  1389.     designed to closely follow  the Pascal syntax in  order to keep DAD's  a
  1390.     universal language for DFD. It consists of the characters "union {" on a
  1391.     single line.  The "(" and ")" parts that are used in Pascal are replaced
  1392.     with "struct  {" and  "} uniquename;"  respectively and  must appear  on
  1393.     separate lines by  themselves.  The following  example may help  clarify
  1394.     this:
  1395.  
  1396.           struct Name   {
  1397.                         STRING FamilyName[32];
  1398.                         STRING ChristianNames[3][16];
  1399.                         };
  1400.  
  1401.           struct Date   {
  1402.                         BYTE  Day;
  1403.                         BYTE  Month;
  1404.                         int   Year;
  1405.                         };
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  1414.  
  1415.  
  1416.  
  1417.     Data Dictionaries                                             Page  2-17
  1418.     Borland's Turbo C, MS C and Computer Innovations C86 ("C")
  1419.  
  1420.  
  1421.  
  1422.           struct Person {
  1423.                         struct Name PersonName;
  1424.                         struct Date Birthdate;
  1425.                         union {                /* variant part */
  1426.                               struct {
  1427.                                      struct Name BirthPlace;
  1428.                                      } s0;
  1429.                               struct {
  1430.                                      struct Name CountryOfOrigin;
  1431.                                      struct Date DateOfEntry;
  1432.                                      struct Date PermittedUntil;
  1433.                                      struct Name PortOfEntry;
  1434.                                      } s1;
  1435.                               } u0;
  1436.                         };
  1437.  
  1438.  
  1439.     For comparison purposes, the equivalent Pascal source record would  look
  1440.     like this:
  1441.  
  1442.           Name = record
  1443.                  FamilyName     : string[32];
  1444.                  ChristianNames : array[1..3] of string[16];
  1445.           end;
  1446.  
  1447.           Date = record
  1448.                  Day   : byte;
  1449.                  Month : byte;
  1450.                  Year  : integer;
  1451.           end;
  1452.  
  1453.           Person=record
  1454.                  PersonName : Name;
  1455.                  Birthdate  : Date;
  1456.                  case byte of
  1457.                     citizen:
  1458.                        (
  1459.                        BirthPlace : Name;
  1460.                        )
  1461.                     Alien:
  1462.                        (
  1463.                        CountryOfOrigin : Name;
  1464.                        DateOfEntry     : Date;
  1465.                        PermittedUntil  : Date;
  1466.                        PortOfEntry     : Name;
  1467.                        )
  1468.           End;
  1469.  
  1470.     After some observation, you'll notice the similarities to Pascal:
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  1477.  
  1478.  
  1479.  
  1480.     Data Dictionaries                                             Page  2-18
  1481.     Borland's Turbo C, MS C and Computer Innovations C86 ("C")
  1482.  
  1483.  
  1484.  
  1485.         Pascal              C                      Purpose
  1486.  
  1487.         somename=record     struct somename {      start type definition
  1488.         end;                };                     end type definition
  1489.         case                union {                begin variant description
  1490.         (                   struct {                begin a part of variant
  1491.         )                   } somename;             end a part of variant
  1492.                             } somename;            end variant description
  1493.  
  1494.     Unfortunately, this syntax is required to keep C and Pascal universal to
  1495.     the DFD program  and the dictionary  formats.  This means  UNIONs cannot
  1496.     appear by themselves, they must  always appear as the last  (or variant)
  1497.     part of the STRUCT (record) as is required by the Pascal language.  This
  1498.     means that UNION's such as:
  1499.  
  1500.     union u {
  1501.             int  a;
  1502.             char b;
  1503.             real c;
  1504.             };
  1505.  
  1506.     would have to be re-written as follows:
  1507.  
  1508.     struct u {                                    /* u=record          */
  1509.              union {                              /*   case byte of    */
  1510.                                                   /*    s1:            */
  1511.                    struct {                       /*      (            */
  1512.                           int  a;                 /*      a : integer; */
  1513.                           } s1;                   /*      )            */
  1514.                                                   /*    s2:            */
  1515.                    struct {                       /*      (            */
  1516.                           char b;                 /*      b : char;    */
  1517.                           } s2;                   /*      )            */
  1518.                                                   /*    s3:            */
  1519.                    struct {                       /*      (            */
  1520.                           float c;                /*      c : real;    */
  1521.                           } s3;                   /*      )            */
  1522.                    } u1;                          /* end;              */
  1523.               };
  1524.  
  1525.     Sorry about the inconvenience - it's one more reason to hate Pascal!
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  1540.  
  1541.  
  1542.  
  1543.     Data Dictionaries                                             Page  2-19
  1544.     Turbo C, MS C and Computer Innovations C86 ("C") - Comments
  1545.  
  1546.  
  1547.  
  1548.     Comments
  1549.  
  1550.     As  mentioned  earlier,  comments  are  consist  of "/*" and "*/".  Each
  1551.     comment must  appear on  a single  line and  not split  accross multiple
  1552.     lines.  Comments may not be nested.
  1553.  
  1554.     The scanner and  DAD builder programs  will remember your  comments.  In
  1555.     order to  do this,  they should  appear after  the semicolon of standard
  1556.     scalar types as follows:
  1557.  
  1558.          STRING  phone[10];     /* This is for your phone number */
  1559.          int     id;            /* Holds your user id            */
  1560.  
  1561.     Comments should be no longer than 80 characters in length.
  1562.  
  1563.     As  another  feature,  comments  of  this  type  beginning  with  2  "#"
  1564.     characters, will be ignored by DFD (data file debugger).  As an example:
  1565.  
  1566.          STRING  Phone[10];     /* This is for your phone number */
  1567.          int     ID;            /*## Holds your user id          */
  1568.  
  1569.     When DFD lists your variables, ID will not be listed.  Therefore, ID  is
  1570.     not accessible to  the DFD user  for modification, listing,  or anything
  1571.     else.   This  is  sort  of  a  built-in  protection DFD offers by making
  1572.     certain fields unavailable  to the user.   Make sure the  "#" characters
  1573.     are the first 2 characters immediately following the "/*".
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  1603.  
  1604.  
  1605.  
  1606.     Data Dictionaries                                             Page  2-20
  1607.     Turbo C, MS C and Computer Innovations C86 ("C") - DAD "Tags"
  1608.  
  1609.  
  1610.  
  1611.     When  working  with  arrays,  it  is  sometimes  more  convenient to use
  1612.     descriptive names for subscripts rather than a number.  This is  allowed
  1613.     with the "/*#START_SET*/" and "/*#END_SET*/" DAD directives.  The  names
  1614.     come from "Start  defining a set  of tags", and  "End defining a  set of
  1615.     tags".  An example would help clarify this:
  1616.  
  1617.          /*#START_SET*/
  1618.  
  1619.          #define MONTH  12
  1620.          #define DAY     7
  1621.          #define HOUR   24
  1622.  
  1623.          /*#END_SET*/
  1624.  
  1625.          struct Info {
  1626.                      ZSTRING MonthTable[MONTH][10];
  1627.                      BYTE    DayTable[DAY];
  1628.                      BYTE    HourTable[HOUR];
  1629.                      int     MmDd[MONTH][DAY];
  1630.                      };
  1631.  
  1632.  
  1633.     With this  method, DFD  will prompt  you for  subscripts using something
  1634.     like "MONTH (0 to 11)", rather than just "(0 to 11)".
  1635.  
  1636.     Note that for ZSTRINGs and STRINGs,  the very last dimension must be  an
  1637.     absolute number, not a TAG.
  1638.  
  1639.     The above example is equivalent to the following:
  1640.  
  1641.          struct Info {
  1642.                      ZSTRING MonthTable[12][10];
  1643.                      BYTE    DayTable[7];
  1644.                      BYTE    HourTable[24];
  1645.                      int     MmDd[12][7];
  1646.                      };
  1647.  
  1648.  
  1649.     The rules for defining DAD TAG's are simple:
  1650.  
  1651.          - No more than 1000 DAD TAG's can be defined in any given source
  1652.            file.
  1653.  
  1654.          - TAG names can be a maximum of 15 characters in length and should
  1655.            begin with a letter of the alphabet.
  1656.  
  1657.          - The TAG definition should start with the "#define" (without
  1658.            quotes) in column 1, be followed immediately by a space, and the
  1659.            space should be followed by the TAG name. The TAG name should be
  1660.            followed by one or more spaces, and a whole number.
  1661.  
  1662.          - The TAG number must be a whole number - no real or negative
  1663.  
  1664.  
  1665.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  1666.  
  1667.  
  1668.  
  1669.     Data Dictionaries                                             Page  2-21
  1670.     Turbo C, MS C and Computer Innovations C86 ("C") - DAD "Tags"
  1671.  
  1672.  
  1673.            numbers are allowed.
  1674.  
  1675.          - Do Not forget to start TAG descriptions with a /*#START_SET*/
  1676.            and end them with a /*#END_SET*/ or they will be ignored. The
  1677.            scanner only looks for and processes STRUCT statements unless it
  1678.            finds these directives!
  1679.  
  1680.  
  1681.     Once a set of TAG's have been defined, you may use them freely  anywhere
  1682.     an array subscript can be used (as in the above example) except for  the
  1683.     last subscript of a STRING or ZSTRING.
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  1729.  
  1730.  
  1731.  
  1732.     Data Dictionaries                                             Page  2-22
  1733.     Turbo C, MS C and C86 ("C") - Creating the DAD
  1734.  
  1735.  
  1736.  
  1737.     Creating the DAD
  1738.  
  1739.     There are two steps two creating the  DAD. The first step is to run  the
  1740.     scanner  program.   The  scanner  translates  your  source  code into an
  1741.     intermediate file with an extension  of ".RRR".  So if your  source code
  1742.     filename  is  "TEST.C"  or  "TEST.REC",  the  scanner  will  create   an
  1743.     intermediate file with a filename of "TEST.RRR".
  1744.  
  1745.     The syntax for using the Scanner is:
  1746.  
  1747.              CSCAN  TEST.C  PERSON
  1748.  
  1749.     Here we assume that TEST.C is the  name of your source file, but it  can
  1750.     be anything you like.  We also assume that the name of your main  STRUCT
  1751.     statement is  PERSON in  this example,  however it  could have  been any
  1752.     STRUCT name that happens to be the main STRUCT of your program.
  1753.  
  1754.     The TEST.C source file might look something like this:
  1755.  
  1756.  
  1757.          /*#START_SET*/
  1758.  
  1759.          #define CHRISTIAN_NAMES 3  /*Remember - Max. of 15-char TAG name*/
  1760.  
  1761.          /*#END_SET*/
  1762.  
  1763.           struct Name {
  1764.                       ZSTRING FamilyName[33];
  1765.                       ZSTRING ChristianNames[CHRISTIAN_NAMES][17];
  1766.                       };
  1767.  
  1768.           struct Date {
  1769.                       BYTE    Day;      /* Day of week   */
  1770.                       BYTE    Month;    /* Month of Year */
  1771.                       int     Year;     /* Year          */
  1772.                       };
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  1792.  
  1793.  
  1794.  
  1795.     Data Dictionaries                                             Page  2-23
  1796.     Turbo C, MS C and C86 ("C") - Creating the DAD
  1797.  
  1798.  
  1799.  
  1800.           struct Person {
  1801.                         struct Name PersonName;
  1802.                         struct Date Birthdate;
  1803.                         union {
  1804.                               struct {
  1805.                                      struct Name BirthPlace;
  1806.                                      } citizen;
  1807.                               struct {
  1808.                                      struct Name CountryOfOrigin;
  1809.                                      struct Date DateOfEntry;
  1810.                                      struct Date PermittedUntil;
  1811.                                      struct Name PortOfEntry;
  1812.                                      } Alien;
  1813.                               } u1;
  1814.                         };
  1815.  
  1816.  
  1817.     If any errors are reported, you must correct them before running the DAD
  1818.     builder program.
  1819.  
  1820.     If all goes well, you can now run one of the DAD builder program:
  1821.  
  1822.        for Turbo C:      TC2DAD   TEST
  1823.           for MS C:      TC2DAD   TEST  /A
  1824.            for C86:      CIC2DAD  TEST
  1825.  
  1826.     NOTE for Turbo C Users: Turbo C lets  you choose how  it will store  its
  1827.                             data in one of 2 ways: byte (unaligned) and word
  1828.                             aligned.  The default  is byte (unaligned).   To
  1829.                             build   a   dictionary   that   aligns   on word
  1830.                             boundaries, append  a "/a"  (without quotes)  to
  1831.                             the input filename.   The "/a" must  be supplied
  1832.                             for  programs  compiled  with  the "-a" compiler
  1833.                             switch (word align).
  1834.  
  1835.     NOTE for Microsoft C:   Microsoft C  lets you  choose how  it will store
  1836.                             its data as with the Turbo C compiler.  However,
  1837.                             defaults are reversed.  The Microsoft C compiler
  1838.                             defaults to  word alignment  so you  must supply
  1839.                             the  "/A"  parameter.   If  your  programs  were
  1840.                             compiled with the "/Zp" compiler switch  (packed
  1841.                             structures), do not supply the "/A" paramter.
  1842.  
  1843.     Do not supply a filename  extension, as it will automatically  assume an
  1844.     extension of ".RRR".  In the above example, the DAD builder program will
  1845.     look for the file TEST.RRR.
  1846.  
  1847.     If the DAD  builder program detects  any errors, it  refers to the  line
  1848.     number in the ".RRR" file.  You  should look at the line number  in that
  1849.     file to determine where in your real file (ie: TEST.C) to look for  your
  1850.     error.
  1851.  
  1852.  
  1853.  
  1854.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  1855.  
  1856.  
  1857.  
  1858.     Data Dictionaries                                             Page  2-24
  1859.     Turbo C, MS C and C86 ("C") - Creating the DAD
  1860.  
  1861.  
  1862.     When the DAD builder program finishes, it will print the number of bytes
  1863.     of each STRUCT type  it finds, and these  numbers should be checked  for
  1864.     accuracy.  One way to  do this is to  write a quick program  that prints
  1865.     the sizes of each of the STRUCTs and make certain these numbers match.
  1866.     If you don't know how to do this, use DAD2SRCE.EXE with the "/c"  option
  1867.     for an example of how to code this.
  1868.  
  1869.     DO NOT  EVER ATTEMPT  TO RUN  DFD WITH  YOUR DICTIONARIES UNLESS THESE
  1870.     NUMBERS MATCH!!! - YOU COULD DESTROY YOUR DATA!!!
  1871.  
  1872.     If the numbers match - congratulations!  You're now ready to run the DFD
  1873.     program and do all kinds of things to your datafiles or databases.   You
  1874.     may now go to the section on using DFD, but before you do, you should be
  1875.     aware of one more thing.  Some  C compilers allow you to have  duplicate
  1876.     member names in  different structs.  You  will have to  make those names
  1877.     unique so that no one variable name appears more than once.  Don't worry
  1878.     - you won't  have to use  an editor and  painfully change everything  by
  1879.     hand.  You can use the DAD  utility program DADUNIQ to do this  for you.
  1880.     To  accomplish  this,  you'll  want  to  run  the utility program on the
  1881.     dictionary you've just created:
  1882.  
  1883.             DADUNIQ  TEST
  1884.  
  1885.     Do not supply  an extension because  this utility program  automatically
  1886.     appends ".DAD" to  the name and  searches for TEST.DAD  in this example.
  1887.  
  1888.     Variable names must be unique otherwise there will be no guarantee as to
  1889.     just which variable you are referring to when you are in DFD.
  1890.  
  1891.     The unique names this utility makes will be transparent to you since  it
  1892.     uses invisible characters, and will therefore appear to be unchanged  to
  1893.     you when in the DFD program.   In most cases, this utility program  will
  1894.     run successfully, but occasionally it will fail if your duplicate member
  1895.     names are close to the  31-character limit.  If you have  a 28-character
  1896.     variable name (member  name) that appears  4 times, the  DADUNIQ program
  1897.     will run successfully, but if it  appears 5 or more times, DADUNIQ  will
  1898.     fail.   The  reason  for  this  is  because DADUNIQ makes variable names
  1899.     unique by  appending 1  invisible character  to the  2nd occurrence of a
  1900.     variable name, bringing  the name to  29-characters, the 3rd  occurrence
  1901.     makes it 30 characters  long, the 4th 31  characters, and the 5th  would
  1902.     put it over the limit. DADUNIQ will alert you if this happens.
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  1918.  
  1919.  
  1920.  
  1921.     The Data File Debugger (DFD) Program - Using DFD               Page  3-1
  1922.     Starting DFD
  1923.  
  1924.  
  1925.  
  1926.     Using DFD
  1927.  
  1928.     Once you have made your  data dictionaries (DAD's) with the  DAD builder
  1929.     programs, you can  use DFD. Before  using DFD, it  is more than  wise to
  1930.     make a copy  of your data  files or databases  under a different  name -
  1931.     just in case you accidentally ruin existing data by making mistakes.  It
  1932.     is your responsibility to insure this data integrity.
  1933.  
  1934.     Before going on with this section,  go through the DEMO section in  this
  1935.     manual to get familiarized with DFD if you haven't already done so.
  1936.  
  1937.     There are 2 ways of starting DFD:
  1938.  
  1939.        Method 1:   DFD
  1940.        Method 2:   DFD  FILENAME
  1941.  
  1942.     With method 1, entering DFD on the DOS command line starts the  program,
  1943.     and anytime you choose a 'dump' option when within the DFD program,  the
  1944.     dump will be routed to your printer at LPT1:
  1945.  
  1946.     With method 2, entering DFD and  some FILENAME, on the DOS command  line
  1947.     will start the program  just as with method  1, except that anytime  you
  1948.     choose a 'dump'  option when within  the DFD program,  the dump will  be
  1949.     routed to FILENAME  instead of to  your printer.  Note  that if FILENAME
  1950.     does not exist, it will be created.  If FILENAME does exist, it will  be
  1951.     appended to.
  1952.  
  1953.     Once DFD is up and running, you will be presented with a colorful screen
  1954.     (unless you're using a monochrome  monitor).  The cursor will be  placed
  1955.     on  the  first  dictionary  name  field  (labeled "Dictionary01:").  The
  1956.     screen will look similar to this:
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  1981.  
  1982.  
  1983.  
  1984.     The Data File Debugger (DFD) Program - Using DFD               Page  3-2
  1985.     Starting DFD
  1986.  
  1987.  
  1988. ┌───[ Data File Debugger (DFD) - (C)Copyright 1986, 1987 - Gilmore Systems ]───┐
  1989. │Dictionary01:         Data:                                                   │
  1990. │Dictionary02:         Data:                                                   │
  1991. │Dictionary03:         Data:                                                   │
  1992. │Dictionary04:         Data:                                                   │
  1993. │Dictionary05:         Data:                                                   │
  1994. │Dictionary06:         Data:                                                   │
  1995. │Dictionary07:         Data:                                                   │
  1996. │Dictionary08:         Data:                                                   │
  1997. │Dictionary09:         Data:                                                   │
  1998. │Dictionary10:         Data:                                                   │
  1999. │Dictionary11:         Data:                                                   │
  2000. │Dictionary12:         Data:                                                   │
  2001. │Dictionary13:         Data:                                                   │
  2002. ├─[F1=Help  F2=Continue  F3=Swap  F4=Clear  F9=DOS  F10=Quit]──────────────────┤
  2003. │Dict#:   #Data Records:        Rec:       │ Tag (     )     Dimens ( )   Subsc│
  2004. │Varname:                                  │1                                  │
  2005. │Rec(     )                                │2                                  │
  2006. │Ref(     )                                │3                                  │
  2007. │Type:                Language:            │4                                  │
  2008. │Length:       Sequence Number:            │5                                  │
  2009. │Main Offset:      Record Offset:          │6                                  │
  2010. ├────────────────────────────────[ D  A  T  A ]────────────────────────────────┤
  2011. │                                                                              │
  2012. └───────────────────────────[                      ]───────────────────────────┘
  2013.  
  2014.     Note that the DFD  display screen is divided  into two halves.  The  top
  2015.     half which  is for  you to  enter dictionary  names and their associated
  2016.     data  files,  and  the  bottom  part  which is for data manipulation and
  2017.     display.  The next two sections deal with these two halves.
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  2044.  
  2045.  
  2046.  
  2047.     The Data File Debugger (DFD) Program - Using DFD               Page  3-3
  2048.     Top Half of the DFD Display Screen
  2049.  
  2050.  
  2051.  
  2052.     You may enter  your first dictionary  name here.  Note  that you have  a
  2053.     maximum  of  8  characters  to  supply  this name.  All dictionaries and
  2054.     related files (files  with an extension  of ".DAD", ".TAD",  and ".KAD")
  2055.     should  be  on  the  default  drive  and  directory.   To  get a list of
  2056.     dictionaries  currently  on  the  default  drive  and directory, hit the
  2057.     function  key  F1.  Do  not  supply  an  extension  when  answering  the
  2058.     "DictionaryXX:" prompts, as DFD automatically looks for an extension  of
  2059.     ".DAD".
  2060.  
  2061.     After entering a dictionary name, hit the ENTER key and the cursor  will
  2062.     move to the "Data:" field.  At this field, you are to supply a data file
  2063.     or database name described by the dictionary name to it's left.  You can
  2064.     supply an optional drive letter and path (ie: C:\DFD\TESTDATA.FIL).   If
  2065.     you do not supply a drive letter, the current drive is assumed.  If  you
  2066.     do not supply a path, the current path is assumed.  After you've entered
  2067.     the data file or database, hit the ENTER key and you'll be taken to  the
  2068.     next  field   ("Dictionary02:").   Repeat   the  process   for  as  many
  2069.     dictionaries and files you want to  work with.  If you hit the  function
  2070.     key  F1  while  in  a  "Data:"  prompt,  you'll be asked what you want a
  2071.     directory  of.   It  is  equivalent  to  the DOS "dir ________" command,
  2072.     except you fill in the blank with drive, path, filename and wildcards.
  2073.  
  2074.     While entering dictionaries  and filenames on  the top portion,  certain
  2075.     keys will do certain things.  The  INS key toggles insert mode, the  DEL
  2076.     key deletes the character under  the cursor and moves everything  to the
  2077.     right of  that character  to the  left by  1, the  left and right cursor
  2078.     (arrow) keys work as expected, and the BACKTAB (Shift+Tab) key moves the
  2079.     cursor to the previous field.  The F1 key was already mentioned, the  F9
  2080.     key lets  you go  into DOS,  the F10  key quits  the program  (with your
  2081.     permission),  the  F4  key  clears  everything  you've  typed on the top
  2082.     portion of the screen, and the F2 key signals the end of dictionary  and
  2083.     data file  entry.  F3  is identical  to F2  when on  the top half of the
  2084.     screen. The ESC key erases the entire field the cursor is on.
  2085.  
  2086.     When  you've  finished  supplying  the  dictionary name(s) and data file
  2087.     name(s) you'd like to work with, hit the function key F2. DFD will  then
  2088.     check all of  the information you've  entered and then  take you to  the
  2089.     bottom half of the screen where you can begin manipulating your data.
  2090.  
  2091.     If DFD can't find a dictionary name you've supplied, you'll be  notified
  2092.     and  the  cursor  will  be  placed  at  the  dictionary prompt number in
  2093.     question.  If you supply a dictionary to a dictionary prompt and fail to
  2094.     supply a  data file  name, you'll  be beeped  at and  the cursor will be
  2095.     placed at the missing data file prompt.
  2096.  
  2097.     If you supply a  data file name that  doesn't exist, you'll be  notified
  2098.     and DFD will  ask you if  you'd like it  to create it  for you.  If  you
  2099.     answer no, you'll be taken back to the invalid filename for  correction.
  2100.     If you answer yes, DFD will prompt you as to how many data records you'd
  2101.     like the  data file  to have.   After answering  that question, DFD will
  2102.     create the data  file for you,  with all fields  initialized with null's
  2103.     (binary zeroes).
  2104.  
  2105.  
  2106.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  2107.  
  2108.  
  2109.  
  2110.     The Data File Debugger (DFD) Program - Using DFD               Page  3-4
  2111.     Top Half of the DFD Display Screen
  2112.  
  2113.  
  2114.  
  2115.     Note: Data files or databases sometimes have a "header" as part of the
  2116.           file before the random part of the file starts. If this is the
  2117.           case, you must inform DFD how long this header is. For example, if
  2118.           the header is 30 bytes long and the data file name is TESTFILE.A,
  2119.           you would answer that "Data:" prompt with "TESTFILE.A,30". This
  2120.           informs DFD that the first record (record 0) starts at offset 30
  2121.           (the 31st byte of the file).
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143.  
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  2170.  
  2171.  
  2172.  
  2173.     The Data File Debugger (DFD) Program - Using DFD               Page  3-5
  2174.     Bottom Half of DFD Display Screen
  2175.  
  2176.  
  2177.  
  2178.     The cursor should now be located at the "Dict#:" prompt.  If you enter a
  2179.     "1" here, you are referring  to the dictionary name and  associated data
  2180.     file  you've   supplied  at   the  top   half  of   the  screen  labeled
  2181.     "Dictionary01:" and "Data:".  Type in the number of the dictionary you'd
  2182.     like to work with.  (Usually "1" to start with) and hit ENTER.  DFD will
  2183.     fill in the  "#Data Records:" field  with how many  data records are  in
  2184.     your data file, and take you to the "Rec:" prompt.
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  2233.  
  2234.  
  2235.  
  2236.     The Data File Debugger (DFD) Program - Using DFD               Page  3-6
  2237.     Bottom Half of DFD Display Screen - "Rec:" prompt
  2238.  
  2239.  
  2240.  
  2241.     The "Rec:" prompt
  2242.  
  2243.     This prompt can be answered in 1 of 4 ways:
  2244.  
  2245.     The first way is to hit the BACKTAB (Shift+TAB) key. Doing this takes
  2246.     you back to the "Dict#:" prompt.
  2247.  
  2248.     The second way is to enter "/d".  This will initiate the Dump procedure.
  2249.     If you entered "/d", you will get a "?" prompt in the field.  You are to
  2250.     respond with the record number you want to dump (0 for the first, 1  for
  2251.     the 2nd, etc).  If you'd like to dump the entire data file, answer  with
  2252.     "0+".  If there are 30 records, and you want to dump the last 5,  answer
  2253.     with "25+".  The dump will be  routed to your printer or file  depending
  2254.     on how you invoked the DFD program from DOS. If you wish to stop a  dump
  2255.     in progress before it completes, simply hit F10. Dumps are an invaluable
  2256.     way of sending  data through communication  lines to mainframe  or other
  2257.     computers not using the same data format as yours (just a thought).
  2258.  
  2259.     The  third  way  is  to  enter  "/z".   This  is the reverse of the Dump
  2260.     procedure.  This takes an ASCII  file as input, and "zaps"  the database
  2261.     with the information in that file.  This will be discussed later in  the
  2262.     Advanced Section later in this manual.
  2263.  
  2264.     The last way is to supply the record number of the record you'd like  to
  2265.     update or see. Note  that record numbers start  with 0, so that  the
  2266.     first record in the file is record 0, the second record is record 1, and
  2267.     so on.  The "#Data Records:" field  filled in by DFD tells you  how many
  2268.     data records  there are  in the  file.  If  it says  3 for example, your
  2269.     choices here are 0,  1, or 2 for  the first, second, and  third records,
  2270.     respectively.  Answer with 0 for now and hit ENTER.
  2271.  
  2272.     DFD will now present you with the first screenful of variable names  for
  2273.     you to choose  from.  If you  have a color  monitor, note that  the main
  2274.     record name is in  magenta, and the word  "RECORD" falls under the  TYPE
  2275.     definition.   The  total  record  length  is  also given.  Note that any
  2276.     REFERENCES to other records are  in green and listed as  REFERENCE under
  2277.     type.  All other entries  are member names in  brown.  You can move  the
  2278.     cursor  up  and  down  to  select  the  member  you want.  A variable is
  2279.     selected by hitting ENTER when you've positioned the cursor to the  line
  2280.     containing the variable you want.  Note  that the line the cursor is  on
  2281.     will be highlighted - if not,  then you'll need to adjust the  intensity
  2282.     or contrast dials on your monitor.  Note that you cannot select a RECORD
  2283.     - only member names (brown) and REFERENCEs (green).
  2284.  
  2285.     If you select a  REFERENCE, DFD will present  you with the member  names
  2286.     and other REFERENCEs (if any) of the subrecord you've chosen.
  2287.  
  2288.     To cancel selection, simply hit the ESC key.
  2289.  
  2290.     Note that if you press the function key F1, DFD will display the comment
  2291.     originally  from  your  source  code  at  the bottom.  This will help to
  2292.     remind you what the field is to  be used for, and you are also  given an
  2293.  
  2294.  
  2295.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  2296.  
  2297.  
  2298.  
  2299.     The Data File Debugger (DFD) Program - Using DFD               Page  3-7
  2300.     Bottom Half of DFD Display Screen - "Rec:" prompt
  2301.  
  2302.  
  2303.     opportunity to modify the comment.
  2304.  
  2305.     Once you've selected a member name,  DFD will take you back to  the main
  2306.     screen  where  it  will  display  the  data  immediately, or ask you for
  2307.     subscripts if you've chosen a dimensioned variable.  If you've chosen  a
  2308.     dimensioned variable, enter the subscripts of the the element you'd like
  2309.     to see at this time.
  2310.  
  2311.     The  cursor  should  now  be  located  at  the "DATA" field, and display
  2312.     whatever data  was in  the variable  you've chosen.   If the  display is
  2313.     blank, there was nothing there.  At  this point, you can either hit  the
  2314.     function key F4  or the BACKTAB  key to cancel,  or you can  overtype or
  2315.     type in the new data to be  put into the field.  If you choose  to enter
  2316.     new data, hit the ENTER key when you're done.  DFD will take you back to
  2317.     the "Dict#:" prompt  when you're finished  entering new data,  or if you
  2318.     cancel data entry.
  2319.  
  2320.     It's that simple!
  2321.  
  2322.     The  4  prompt  areas  on  the  bottom  half of the screen are "Dict#:",
  2323.     "Rec:", "Subsc", and "DATA".  So far we've covered "Dict#:" and part  of
  2324.     the "Rec:" prompt.  More on the "Rec:" prompt will be covered under  the
  2325.     "Advanced Secion" section of this manual.
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  2359.  
  2360.  
  2361.  
  2362.     The Data File Debugger (DFD) Program - Using DFD               Page  3-8
  2363.     Bottom Half of DFD Display Screen - "Subsc" prompt
  2364.  
  2365.  
  2366.  
  2367.     The Subsc prompt field contains 6 entry fields - 1 for every dimension
  2368.     in  a  dimensioned  variable.   If  the  variable  you've  chosen is not
  2369.     dimensioned, the cursor will be located at the DATA prompt.
  2370.  
  2371.     If  the  selected  variable  is  dimensioned  (anywhere  from  1  to   6
  2372.     dimensions), the  cursor will  be placed  at the  first dimension prompt
  2373.     field.  It is asking you to input the element number of that  dimension.
  2374.     For example if the selected variable was declared as:
  2375.  
  2376.          varname : array[1..5,1..7] of integer;
  2377.  
  2378.     you would supply  for the first  dimension the element  number which can
  2379.     range from 1 to 5, and then hit ENTER.  For the second dimension prompt,
  2380.     you would respond with the 2nd  dimension number which can range from  1
  2381.     to 7 and hit  ENTER.  If there were  2 dimensions, the cursor  would not
  2382.     move to the 3rd dimension prompt, but over to the DATA prompt.
  2383.  
  2384.     If you responded to the 2  dimension prompts with 2 and 4  respectively,
  2385.     you would be  shown the data  element associated with  varname[2,4] at
  2386.     the DATA field.
  2387.  
  2388.  
  2389.  
  2390.  
  2391.  
  2392.  
  2393.  
  2394.  
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  2422.  
  2423.  
  2424.  
  2425.     The Data File Debugger (DFD) Program - Using DFD               Page  3-9
  2426.     Bottom Half of DFD Display Screen - "D A T A" prompt
  2427.  
  2428.  
  2429.  
  2430.     The D A T A field (hereinafter  reffered to as DATA) at the bottom  of
  2431.     the screen contains  the actual data  value of what  was in the  file as
  2432.     described by the variable you've chosen.
  2433.  
  2434.     In the case  of a string  (this includes string,  lstring, zstring) this
  2435.     field will be blank if nothing was there.
  2436.  
  2437.     In the case of "char" data,  a single character will be displayed  (note
  2438.     that a blank is also a char).
  2439.  
  2440.     In the  case of  reals (this  includes real,  real8, float, double) this
  2441.     field will  be displayed  in the  simplist way.   If the  field contains
  2442.     "15.00" for example, it will  simply be displayed "15".  If  it contains
  2443.     "-6.7"  it  will  display  "-6.7".   If  it  contains  "3.14" it will be
  2444.     displayed as "3.14".  If it contains "0.0000007481" it will be displayed
  2445.     as "7.481000E-07".  On  display, the 6  most significant digits  (to the
  2446.     right of the decimal) will be displayed.
  2447.  
  2448.     In all other cases, the display will be obvious.
  2449.  
  2450.     In any event, the cursor will  be located at the first character  of the
  2451.     display.  You may overtype the data  the display with new data and  then
  2452.     hit ENTER to complete the update.  Or you can cancel data entry (update)
  2453.     by pressing either F4 or BACKTAB (Shift + Tab).
  2454.  
  2455.     Other keys are available to you in the data field:
  2456.  
  2457.         ESC          - erase the entire field (clear field)
  2458.         Cursor left  - move cursor to previous character
  2459.         Cursor right - move cursor to next character
  2460.         Ins          - Toggle Insert mode
  2461.         Del          - Delete the character at the cursor
  2462.         Backspace    - Destructive Backspace
  2463.         Home         - Position cursor at beginning of field
  2464.         End          - Position cursor at end of field
  2465.         F4           - Cancel update (data entry) of this field
  2466.         BACKTAB      - Cancel update (data entry) of this field
  2467.         ENTER        - Accept update and immediately update the data file
  2468.  
  2469.  
  2470.     The BACKTAB and ENTER keys have additional meanings when doing automatic
  2471.     prompted input  of an  array (dimensioned  variable) -  see the Advanced
  2472.     Section of this manual for more information.
  2473.  
  2474.     After you have ENTERed your new data or cancelled the update with F4  or
  2475.     BACKTAB, the cursor will be placed at the "Dict#:" prompt again  (unless
  2476.     you  are  automatically  prompted  for  array  input  - see the Advanced
  2477.     section of this manual).  At this point you may just hit ENTER again  to
  2478.     work with the same  dictionary and data file  (database) or enter a  new
  2479.     dictionary number to  work with.  Note  that if you  work with the  same
  2480.     dictionary again  the cursor  will immediately  go to  the "Rec:" prompt
  2481.     since  this  data  dictionary  is  already  in  RAM. If you choose a new
  2482.  
  2483.  
  2484.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  2485.  
  2486.  
  2487.  
  2488.     The Data File Debugger (DFD) Program - Using DFD              Page  3-10
  2489.     Bottom Half of DFD Display Screen - "D A T A" prompt
  2490.  
  2491.  
  2492.     dictionary number, it will take a couple of seconds longer since DFD has
  2493.     to load a new dictionary into RAM.
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  2548.  
  2549.  
  2550.  
  2551.     The Data File Debugger (DFD) Program - Advanced Section        Page  4-1
  2552.     Dimensioned Variables ("Subsc" Prompt Field)
  2553.  
  2554.  
  2555.  
  2556.     Whenever you are working with a dimensioned variable (array), you can do
  2557.     some advanced things at the "Subsc" prompt field. These are:
  2558.  
  2559.           /I - prompt for automatic array INPUT
  2560.           /F - FILL the array elements with identical data
  2561.           /D - DUMP the array elements
  2562.           /M - MODIFY the tagname given to this subscript range
  2563.  
  2564.  
  2565.                                    Using "/I"
  2566.  
  2567.     By entering "/I" (without quotes) as a response to a "Subsc" prompt, DFD
  2568.     will respond with a "?".  The question mark is DFD's way of saying - Ok,
  2569.     I'll prompt you for  array input - what  subscript do you want  to start
  2570.     with?  You are then  to overtype the "?"  with the subscript number  you
  2571.     want to start with.
  2572.  
  2573.     For example, if the selected variable was declared as:
  2574.  
  2575.        varname : array[0..4,1..7,2..6] of real;
  2576.  
  2577.     you could enter the "/I" at  the first, second, or third "Subsc"  prompt
  2578.     field.  If "/I" was entered at  the first field, the next two  subscript
  2579.     field prompts will be filled in by  DFD with 1 and 2.  Data Entry  would
  2580.     start at  this point  until the  end of  the array  was reached.  If you
  2581.     supply the "/I" response at the  2nd field, the first field entry  would
  2582.     remain, and the 3rd field entry would be filled in by DFD as 2 and  data
  2583.     entry would start from there.
  2584.  
  2585.     Some examples would help clarify this:
  2586.  
  2587.          Start prompted entry at varname[2,3,3]
  2588.  
  2589.                                     2
  2590.  
  2591.                                     3
  2592.                                     /i  ---> ? ---> 3
  2593.  
  2594.          Start prompted entry at varname[4,1,2]
  2595.  
  2596.                                     /i  ---> ? ---> 4
  2597.  
  2598.          Start prompted entry at varname[0,3,2]
  2599.  
  2600.                                     0
  2601.                                     /i  ---> ? ---> 3
  2602.  
  2603.     The notation of "---> ?  ---> n" means that after  a "/i" a "?" will  be
  2604.     displayed.  You are to overtype the "?" with a number that is within the
  2605.     subscript range for this dimension.
  2606.  
  2607.     When the "?" prompt is answered  with your response, the cursor will  be
  2608.  
  2609.  
  2610.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  2611.  
  2612.  
  2613.  
  2614.     The Data File Debugger (DFD) Program - Advanced Section        Page  4-2
  2615.     Dimensioned Variables ("Subsc" Prompt Field)
  2616.  
  2617.  
  2618.     placed in the  DATA area and  you may start  data entry.  Hitting  ENTER
  2619.     enters  the  data  you  have  supplied  or  whatever  the data is that's
  2620.     currently  displayed  in  the  DATA  area,  and  updates  the  data file
  2621.     immediately.  The ENTER key  also takes you to  the next element in  the
  2622.     array for data entry and updates the "Subsc" field to reflect which data
  2623.     element you are now being prompted for.  Hitting BACKTAB (Shift+TAB)  or
  2624.     F4 will cause  cancellation of the  current element and  go back to  the
  2625.     previous data element for entry -  the "Subsc" field will be updated  to
  2626.     reflect this.  Hitting F10 cancels  data entry altogether and goes  back
  2627.     to the "Dict#:" prompt.
  2628.  
  2629.                                    Using "/F"
  2630.  
  2631.     The  "/F"  response  (without  quotes)  means  that you want to fill all
  2632.     elements in the  array with the  same piece of  data.  When you  respond
  2633.     with a "/F", DFD responds with a "?".  You are to overtype the "?"  with
  2634.     the same kind of  response that the "/I"  prompt expects.  Once the  "?"
  2635.     prompt has been answered,  the cursor will be  moved to the DATA  field,
  2636.     and you may enter the data that you'd like the array to be filled  with.
  2637.     After hitting ENTER, DFD will update the entire array (or portion of the
  2638.     array depending on how you answered  the "?" prompt) with that piece  of
  2639.     data and immediately update your data file (database).
  2640.  
  2641.                                    Using "/D"
  2642.  
  2643.     The "/D" response (without quotes) tells  DFD that you want to dump  the
  2644.     contents of the array elements to the printer or to a file, depending on
  2645.     how you started the DFD program.   DFD will respond to "/D" with  a "?",
  2646.     and should be answered in the same fashion as with "/F" or "/I".  If you
  2647.     wish to stop a dump in progress before it completes, hit F10.
  2648.  
  2649.                                    Using "/M"
  2650.  
  2651.     The "/M" response (without quotes) is an extra goodie that has no effect
  2652.     on your  data.  Instead,  it modifies  the tagname  you supplied in your
  2653.     source  code  record  layout  to  be  associated  with  this  particular
  2654.     subscript range.  If there was  no tagname given, here's your  chance to
  2655.     create  a  tagname  for  the  subscript  range.  Entering "/M" moves the
  2656.     curser to the "Tag" field - you may now overtype or enter a new  tagname
  2657.     in  this  field,  then  hit  ENTER  to complete the tagname update.  The
  2658.     cursor will then move back to the "Subsc" prompt where you can supply  a
  2659.     subscript or "/I" or  "/F" or "/D" or  even "/M" again.  Spaces  will be
  2660.     ignored, so use the underscore  ("_") character for readability just  as
  2661.     you would in a high level language.
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  2674.  
  2675.  
  2676.  
  2677.     The Data File Debugger (DFD) Program - Advanced Section        Page  4-3
  2678.     Zapping (batch entry)
  2679.  
  2680.  
  2681.  
  2682.                              Zapping (batch entry)
  2683.  
  2684.     In order to  understand "zapping", you  must first undestand  "dumping",
  2685.     because zapping is the reverse of dumping.
  2686.  
  2687.     When you dump a data file, you get a file or printout (depending on  how
  2688.     you started DFD)  containing the name  of the data  file, the dictionary
  2689.     name,  the  date,  time,  language,  the  data file main-record-name and
  2690.     main-record-number, then the variable names and data contents.
  2691.  
  2692.     DFD requires that prior to making assignments, the file must start  with
  2693.     the name of the  data file main-record-name and  main-record-number just
  2694.     the way a DFD dump does.  This is discussed in more detail later.
  2695.  
  2696.     Study a printout of a DFD  dump file.  Once you are thoroughly  familiar
  2697.     with the format,  think of it  as an "assignment  oriented language" (or
  2698.     AOL).  This means that you  can take a dump file  and edit it in a  text
  2699.     editor to make any data changes you wish.  Delete those you don't  want.
  2700.     Add assignments that you do  want.  When finished editing your  changes,
  2701.     simply save the file.  This file can  be used later as a "zap" file,  or
  2702.     batch  entry  file.   The  next  time  you're  at the "Rec:" prompt, try
  2703.     entering "/Z" (without the quotes).  DFD will then ask you what filename
  2704.     to "zap" from.  Use the filename of the file you just edited.  DFD  will
  2705.     now  read  this  file  and  interpret  it.   To  DFD,  this is a file of
  2706.     assignments   (or   AOL)   commands.    These   assignment  commands are
  2707.     interpreted and carried out one at a time.
  2708.  
  2709.     DFD provides error messages on the printer during the "zap" process, so
  2710.     make sure your printer is ON during a "zap"!
  2711.  
  2712.     This method of "dumping", optionally editting, and "zapping" can be used
  2713.     as a means of transforming data from one language format to another (ie:
  2714.     Turbo  Pascal  data  format   to  Microsoft  data  format   or  Computer
  2715.     Innovations data  format).  The  AOL format  is independant  of computer
  2716.     language used.
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  2737.  
  2738.  
  2739.  
  2740.     The Data File Debugger (DFD) Program - Advanced Section        Page  4-4
  2741.     Assignment Oriented Language (AOL)
  2742.  
  2743.  
  2744.  
  2745.                        Assignment Oriented Language (AOL)
  2746.  
  2747.     The Assignment Oriented Language (AOL) is a DFD language.  It is written
  2748.     independant  of  different  Pascal,  C,  or  any other language dialect,
  2749.     although  it  resembles  that  of  most  languages.   See the section on
  2750.     "zapping" for a brief introduction to AOL.
  2751.  
  2752.     Like most  languages, the  variable name  is on  the left  of the equals
  2753.     sign, indicating this variable is  the target of the assignment.   It is
  2754.     followed by and  equals (=) sign,  which is followed  by the data.   The
  2755.     data rules  are simple.   Strings, Lstrings,  Zstrings, or  any type  of
  2756.     string data is to be delimited by double quotation marks (").  Character
  2757.     data is to  be delimited by  single quotation marks  (').  Whole numbers
  2758.     are digits and an optional minus (-) preceding the number.  Real numbers
  2759.     follow the rules of  whole numbers, but can  also have a decimal  point,
  2760.     and an E (to  indicate E-Format numbers -  your BASIC manual has  a good
  2761.     explanation) which must be followed by plus or minus (+/-) and a number.
  2762.     This E format is also known as Scientific Notation.
  2763.  
  2764.     Summarizing:
  2765.  
  2766.          DATA TYPE         DELIMITERS     EXAMPLES
  2767.  
  2768.          string            "   "          varname = "This is a string"
  2769.                                           varname = "This is longer     "
  2770.  
  2771.          character         ' '            varname = 'c'
  2772.                                           varname = '0'
  2773.  
  2774.          whole number      none           varname = 35
  2775.                                           varname = -3265
  2776.  
  2777.          real number       none           varname = 15
  2778.                                           varname = 3.1415
  2779.                                           varname = -7.6
  2780.                                           varname = 2.768E-10
  2781.                                           varname = -4.444E+3
  2782.  
  2783.          dimensioned       depends on     string[3][2][6] = "some string"
  2784.                            type           character[2][5] = 'Y'
  2785.                                           somereal[4][18] = 33.752
  2786.                                           somereal[100]   = 3.621E-15
  2787.  
  2788.  
  2789.     Just as  with a  language such  as Pascal  or C,  you can refer to other
  2790.     records (subrecords of the main record).  For example:
  2791.  
  2792.             work.supervisor[5].lastname = "Doe"
  2793.  
  2794.     Before any  assignment statements  are given,  you must  begin your file
  2795.     with the name for the data record (note the 3 asterisks):
  2796.  
  2797.  
  2798.  
  2799.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  2800.  
  2801.  
  2802.  
  2803.     The Data File Debugger (DFD) Program - Advanced Section        Page  4-5
  2804.     Assignment Oriented Language (AOL)
  2805.  
  2806.  
  2807.             *** data record =  "mainrec[0]."
  2808.  
  2809.     This informs DFD that the name of the main record is "mainrec" and  that
  2810.     you are updating the first record in the data file ("mainrec[0]."),  and
  2811.     that "mainrec[0]." is to precede all of the following variable names (if
  2812.     you use Microsoft  Pascal, think of  it as being  similar to the  "with"
  2813.     statement). This means that:
  2814.  
  2815.             person.lastname = "Smith"
  2816.  
  2817.     is interpreted by DFD as:
  2818.  
  2819.             mainrec[0].person.lastname = "Smith"
  2820.  
  2821.     and the first record gets updated.  A data statement can occur  anywhere
  2822.     in the AOL file.  This enables you to change which record number in  the
  2823.     data  file  or  database  is  to  be  operated  on  by  DFD  for the AOL
  2824.     assignments following.  For example:
  2825.  
  2826.             *** data record = "mainrec[5]."
  2827.  
  2828.     tells DFD that AOL assignments  following this statement are to  be used
  2829.     to update the 6th record  in the file (0=first record,  1=second record,
  2830.     etc).  Now:
  2831.  
  2832.             person.lastname = "Smith"
  2833.  
  2834.     is interpreted by DFD as:
  2835.  
  2836.             mainrec[5].person.lastname = "Smith"
  2837.  
  2838.     If, while in the  process of "zapping" DFD  finds any errors (such  as a
  2839.     missing quote), DFD will display  error messages on the printer,  so you
  2840.     must have your printer on  during a "zap".  Error messages  tell you
  2841.     what line number  in the zap  file had the  error.  You must  edit these
  2842.     errors in a text editor to correct them.
  2843.  
  2844.  
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858.  
  2859.  
  2860.  
  2861.  
  2862.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  2863.  
  2864.  
  2865.  
  2866.     The Data File Debugger (DFD) Program - Advanced Section        Page  4-6
  2867.     Converting Data to Other Languages
  2868.  
  2869.  
  2870.  
  2871.     Suppose you've  written a  Turbo Pascal  program that  has saved tons of
  2872.     data to  a file  and this  file must  be readable  by a Microsoft Pascal
  2873.     program, or vice versa.  This data could have been written to a file  by
  2874.     any of the five currently supported language compilers and a need arises
  2875.     to convert the data to another language format.  This can easily be done
  2876.     with DFD's "dump" and "zap" features.
  2877.  
  2878.     To use an example, take the demo source record layout file  ("demo.rec")
  2879.     and copy it as "mspdemo.rec".  "Demo.rec" is for Turbo Pascal users.  To
  2880.     build a  dictionary for  Microsoft Pascal,  edit the  file "mspdemo.rec"
  2881.     that you just made a copy  of in your favorite text editor.   Change all
  2882.     occurences of " string[" to "  lstring(" and don't forget to change  the
  2883.     ending "]" of strings to  ")" for lstrings.  Next change  all occurences
  2884.     of "real" to "real8".  The reason  for this is that a Turbo  Pascal real
  2885.     is a 6-byte  piece of data,  whereas Microsoft Pascal  has two types  of
  2886.     reals:  "real"  and  "real8".   A  Microsoft  "real"  is 4-bytes while a
  2887.     Microsoft "real8" is 8-bytes.  A Turbo Pascal "real" being 6-bytes  long
  2888.     can hold a larger number than a Microsoft Pascal "real", but a Microsoft
  2889.     Pascal "real8" can hold a larger number than a Turbo Pascal "real".  You
  2890.     could automate these changes with DAD2SRCE.EXE explained later.
  2891.  
  2892.     After making these syntactical changes, save the file and run the Pascal
  2893.     scanner program:
  2894.  
  2895.          PASSCAN  MSPDEMO.REC  CUSTOMER
  2896.  
  2897.     Next run the Dictionary Builder program:
  2898.  
  2899.          MSPA2DAD  MSPDEMO
  2900.  
  2901.     and a Microsoft Pascal Data Dictionary has been created.
  2902.  
  2903.     Note: If you haven't already created a Turbo Pascal DAD as outlined in
  2904.           the demo section of this manual, you may to so now by executing
  2905.           the following two lines at the DOS command prompt:
  2906.  
  2907.               PASSCAN  DEMO.REC  CUSTOMER
  2908.               TPAS2DAD  DEMO
  2909.  
  2910.     Now you can  start the DFD  program, but do  so with a  dump filename as
  2911.     follows:
  2912.  
  2913.          DFD  SAMPLE.DMP
  2914.  
  2915.     When  the   DFD  main   screen  appears,   respond  to   the  first  two
  2916.     "DictionaryXX:" and "Data:" prompts as follows:
  2917.  
  2918.          Dictionary01: DEMO     Data: DEMO.DB
  2919.          Dictionary02: MSPDEMO  Data: MSPDEMO.DB
  2920.  
  2921.     and hit F2. DFD will inform  you that the data file MSPDEMO.DB  does not
  2922.     exist and want's to know if you'd like DFD to create it for you.  Answer
  2923.  
  2924.  
  2925.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  2926.  
  2927.  
  2928.  
  2929.     The Data File Debugger (DFD) Program - Advanced Section        Page  4-7
  2930.     Converting Data to Other Languages
  2931.  
  2932.  
  2933.     'Y' (without quotes) and DFD will  then ask how many Data Records  you'd
  2934.     like the  database file  to have.   Answer '5'  (without quotes) and hit
  2935.     ENTER.  DFD has just created an empty  data file for you by the name  of
  2936.     MSPDEMO.DB which we'll fill in a moment.
  2937.  
  2938.     The cursor should now be at  the "Dict#:" prompt.  ENTER a '1'  (without
  2939.     quotes).  The  cursor will  now move  to the  "Rec:" prompt.  ENTER "/D"
  2940.     (without quotes) and DFD will respond with a "?".  Overtype the "?" with
  2941.     "0+"  (without  quotes)  and  hit  ENTER.   DFD will now dump the entire
  2942.     database to the dump filename used when you started DFD (SAMPLE.DMP).
  2943.  
  2944.     When the dump process finishes dumping the last data record ("Rec:  4"),
  2945.     get  the  cursor  back  to  the  "Dict#:"  prompt  by  hitting   BACKTAB
  2946.     (Shift+Tab).  ENTER  '2' (without  quotes) to  tell DFD  you now want to
  2947.     work with  the MSPDEMO  data dictionary  and MSPDEMO.DB  data file.  The
  2948.     cursor  will  now  be  located  at  the "Rec:" prompt again.  ENTER "/Z"
  2949.     (without quotes) and DFD will ask you which file to "zap" from.  Respond
  2950.     with "SAMPLE.DMP" (without  quotes) and hit  ENTER.  DFD will  now "zap"
  2951.     the  data  file  in  the  proper  format  with  the  data  found  in the
  2952.     "SAMPLE.DMP" file.
  2953.  
  2954.     When the  "zap" process  finsishes, the  data file  MSPDEMO.DB will  now
  2955.     contain Microsoft Pascal readable and writable data!
  2956.  
  2957.     Let's take a look  at what happened.  First  we created a source  record
  2958.     file of the language we wanted to convert to.  We made sure the variable
  2959.     names  stayed  the  same,  but  changed  the syntax to correspond to the
  2960.     language we want.   Next we created  a DAD for  the new language  record
  2961.     layout.  Then we went  into DFD and had  DFD create an empty  data file.
  2962.     We  dumped  the  old  data  file  to  a dump file.  Since dump files are
  2963.     written out in AOL (Assignment  Oriented Language), this same dump  file
  2964.     was used as input to the  "zap" process to "zap" the newly  created data
  2965.     file with  the data  we wanted.   Although this  process of  dumping and
  2966.     zapping takes a  lot of time  to perform (and  sufficient disk space  to
  2967.     hold the dump), it sure beats manual data entry of perhaps thousands  of
  2968.     elements and it removes the possibility of human error.
  2969.  
  2970.     Incidentally, note that the same data  as stored by Turbo Pascal in  the
  2971.     file DEMO.DB as compared to the Microsoft Pascal data stored in the file
  2972.     MSPDEMO.DB is  smaller in  size.  This  is due  mainly because Microsoft
  2973.     Pascal aligns  its data  on word  boundaries, whereas  Turbo Pascal does
  2974.     not.   Therefore,  space  gets  wasted  with  Microsoft Pascal, however,
  2975.     Microsoft claims faster data access with their data scheme - you be  the
  2976.     judge.
  2977.  
  2978.  
  2979.  
  2980.  
  2981.  
  2982.  
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  2989.  
  2990.  
  2991.  
  2992.     DAD Utility Programs                                           Page  5-1
  2993.     DAD Utility Programs - Overview
  2994.  
  2995.  
  2996.  
  2997.                               DAD Utility Programs
  2998.  
  2999.     DAD  Utility  Programs  are   programs  that  manipulate  or   extract
  3000.     information from a DAD (Data Dictionary).  There are four such  programs
  3001.     that are included in the DFD package.  These are:
  3002.  
  3003.              DADSORT  -  alphabetically sorts variables by name
  3004.              DAD2SRCE -  converts a DAD to source code
  3005.              DADRPT   -  produces a report of a DAD in human-readable form
  3006.              DADUNIQ  -  scans a DAD for duplicate variable names and makes
  3007.                          them unique.
  3008.  
  3009.     The DADSORT and DADUNIQ programs manipulate (change) the DAD, while  the
  3010.     DAD2SRCE and DADRPT programs extract information from the DAD to produce
  3011.     human-readable text files.
  3012.  
  3013.     All DAD utility programs will give a brief description of the syntax  by
  3014.     executing them at the  DOS command prompt without  providing parameters.
  3015.     For example, run DAD2SRCE without  parameters for information on how  to
  3016.     start the program and the different options available.
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050.  
  3051.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  3052.  
  3053.  
  3054.  
  3055.     DAD Utility Programs                                           Page  5-2
  3056.     DADSORT
  3057.  
  3058.  
  3059.  
  3060.                                     DADSORT
  3061.  
  3062.     The DADSORT is a DAD utility program that sorts a Data Dictionary  (DAD)
  3063.     in alphabetical order by variable name.  The syntax for its use is:
  3064.  
  3065.            DADSORT  dadfile
  3066.  
  3067.     where "dadfile"  is the  name of  a data  dictionary.  Data dictionaries
  3068.     have filename  extensions of  ".DAD" and  DADSORT knows  this, so do not
  3069.     supply a filename extension as  DADSORT will automatically look for  the
  3070.     data dictionary with an extension of ".DAD".
  3071.  
  3072.     DADSORT sorts the DAD  file in a certain  way.  After sorting, you  will
  3073.     notice from  the DFD  program (when  choosing a  variable from this DAD)
  3074.     that RECORDs  and REFERENCEs  always appear  at the  top of the variable
  3075.     list.  As usual,  RECORDs are in  magenta, and REFERENCEs  are in green.
  3076.     The member names are then listed (in brown) in alphabetical order.
  3077.  
  3078.     Without sorting, all variables appear in the DFD selection list as  they
  3079.     were found in your program which  may be more comfortable for you.   But
  3080.     if someone else is updating a database and there is a huge selection  of
  3081.     variables, then  it would  be easier  for them  to use  a sorted list of
  3082.     variables  rather  than  looking  through  every screen for a particular
  3083.     variable name.
  3084.  
  3085.  
  3086.  
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  3115.  
  3116.  
  3117.  
  3118.     DAD Utility Programs                                           Page  5-3
  3119.     DAD2SRCE
  3120.  
  3121.  
  3122.  
  3123.                                     DAD2SRCE
  3124.  
  3125.     The DAD2SRCE utility  program uses a  data dictionary as  its input, and
  3126.     the comments  and tags  files if  available.  It  produces as  output, a
  3127.     source  code  version  of  the  dictionary  (and  comments  and  tags if
  3128.     available).
  3129.  
  3130.     If you're data  dictionary name is  TEST, then you  would start DAD2SRCE
  3131.     with:
  3132.  
  3133.             DAD2SRCE  TEST
  3134.  
  3135.     DAD2SRCE  will  look  for  "TEST.DAD"  (data dictionary) first, and then
  3136.     "TEST.TAD" (tag dictionary),  and then "TEST.KAD"  (comment dictionary).
  3137.     As long as it finds "TEST.DAD" the program will run succesfully.  If  it
  3138.     finds  the  tag  dictionary  ("TEST.TAD"),  it  will include tags in the
  3139.     source code output.  If it finds the comment dictionary ("TEST.KAD"), it
  3140.     will include comments in the source code output.
  3141.  
  3142.     The output from DAD2SRCE is automatically routed to your display screen.
  3143.     If you wish to have the output go to your printer, you must redirect the
  3144.     output of this program to the printer with the redirection symbol  (">")
  3145.     as follows:
  3146.  
  3147.            DAD2SRCE  TEST  >PRN
  3148.  
  3149.     Likewise, if you want to have output go to a disk file, you can redirect
  3150.     the output of this program to a disk file:
  3151.  
  3152.            DAD2SRCE  TEST  >TEST.OUT
  3153.  
  3154.     DAD2SRCE also has different  options available for different  languages.
  3155.     These options  add certain  things to  the generated  source code.   The
  3156.     options are specified by following the dictionary name with one or  more
  3157.     spaces and the option.  The options available are:
  3158.  
  3159.         /B - Generate bracketed offsets (MS-PASCAL only!)
  3160.         /C - Generate compilable code to print structure sizes (C only)
  3161.         /O - Generate Offset and record length info as comments
  3162.         /L=LANGUAGE - Generate code for a given language, where LANGUAGE is
  3163.                       one of:
  3164.  
  3165.                          C86    (Computer Innovations C)
  3166.                          TC     (Turbo C/MS C)
  3167.                          MSPAS  (Microsoft Pascal)
  3168.                          TPAS   (Turbo Pascal)
  3169.  
  3170.                       Exercise care when using this option.
  3171.  
  3172.     To  generate  a  source  file  from  a  Turbo  Pascal  dictionary  named
  3173.     "test.dad" with offset  and record length  information as comments,  and
  3174.     route the output to a file named "test.out", you would execute  DAD2SRCE
  3175.  
  3176.  
  3177.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  3178.  
  3179.  
  3180.  
  3181.     DAD Utility Programs                                           Page  5-4
  3182.     DAD2SRCE
  3183.  
  3184.  
  3185.     as follows:
  3186.  
  3187.          DAD2SRCE  TEST  /O  >TEST.OUT
  3188.  
  3189.     To generate a Turbo  C source file from  a Turbo Pascal dictionary named
  3190.     "test.dad" with offset  and record length  information as comments,  and
  3191.     route the output to a file named "test.out", you would execute  DAD2SRCE
  3192.     as follows:
  3193.  
  3194.          DAD2SRCE  TEST  /O/L=TC  >TEST.OUT
  3195.  
  3196.     The output file  TEST.OUT will now  contain generated source  code, with
  3197.     information  about  record  length  and  offsets  as  pertaining to each
  3198.     variable.
  3199.  
  3200.  
  3201.  
  3202.  
  3203.  
  3204.  
  3205.  
  3206.  
  3207.  
  3208.  
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.  
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  3241.  
  3242.  
  3243.  
  3244.     DAD Utility Programs                                           Page  5-5
  3245.     DADRPT
  3246.  
  3247.  
  3248.  
  3249.                                      DADRPT
  3250.  
  3251.     This utility program produces a report of a DAD (Data Dictionary).   The
  3252.     report contains a human-readable version of what's in the DAD. For  each
  3253.     variable,  record,  or  reference,  the  report  contains  the following
  3254.     information:
  3255.  
  3256.         Variable Name    X :
  3257.         Tag Number         :
  3258.         Comment Number     :
  3259.         Record Offset      :
  3260.         Declaration        :
  3261.         No. dimensions     :
  3262.         Length             :
  3263.         Record Number      :
  3264.         Record Reference   :
  3265.  
  3266.     Of course all  fields to the  right of each  (":") will be  filled in by
  3267.     DADRPT.  In the first  field "Variable Name X",  X is replaced with  the
  3268.     sequence  number  of  the  variable,  that  is  the  order in which that
  3269.     variable  appeared  when  the  dictionary  was  created.  Note that this
  3270.     report will be  in order by  sequence number in  an unsorted dictionary,
  3271.     and in alphabetical order by variable name in a sorted dictionary.
  3272.  
  3273.     To run DADRPT,  simply enter DADRPT  followed by the  dictionary name at
  3274.     the DOS command  prompt.  For example,  if your dictionary  is TEST.DAD,
  3275.     you would start DADRPT as follows:
  3276.  
  3277.          DADRPT  TEST
  3278.  
  3279.     Do not supply a filename extension, as DADRPT automatically looks for an
  3280.     extension of ".DAD".
  3281.  
  3282.     Note that the output of DADRPT  goes to your display screen.  So  if you
  3283.     want the output to  go to your printer,  you would have to  redirect the
  3284.     output to the printer with the ">" character as follows:
  3285.  
  3286.          DADRPT  TEST  >PRN
  3287.  
  3288.     Likewise, if  you want  the output  to go  to a  file instead, you would
  3289.     redirect the output to that file as follows:
  3290.  
  3291.          DADRPT  TEST  >TEST.RPT
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  3304.  
  3305.  
  3306.  
  3307.     DAD Utility Programs                                           Page  5-6
  3308.     DADUNIQ
  3309.  
  3310.  
  3311.  
  3312.                                     DADUNIQ
  3313.  
  3314.     This  utility  program  may  be  necessary  for  you.   While the Pascal
  3315.     compiler and some C  compilers let you use  the same member name  inside
  3316.     different RECORDs or STRUCTs, DFD does not.  Each variable name, whether
  3317.     it is a recordname, structname, membername, reference or anything  else,
  3318.     must be unique.   While the language  scanners and DAD  builder programs
  3319.     will go ahead  and build the  dictionary, DFD will  not fetch the  right
  3320.     variable if it appears more than  once, as DFD only looks for  the first
  3321.     match  it  finds.   Therefore,  DADUNIQ  is  a utility program that goes
  3322.     through your DAD and makes all duplicate variable names unique.
  3323.  
  3324.     It is a good idea to run the DADUNIQ program after every dictionary  you
  3325.     create just to  make sure that  the variable names  are unique.  To  run
  3326.     this utility, simply enter the following at the DOS command prompt:
  3327.  
  3328.          DADUNIQ  DADNAME
  3329.  
  3330.     where DADNAME  is the  name of  your data  dictionary.  Do  not supply a
  3331.     filename extension, as DADUNIQ  automatically searches for an  extension
  3332.     of ".DAD".
  3333.  
  3334.     DADUNIQ makes variable names unique by appending invisible characters to
  3335.     the end of the  name.  For purposes of  our example, let's suppose  that
  3336.     the invisible character  is the "&"  character.  So if  your source code
  3337.     had 5 duplicate names such as "PHONE", the DADUNIQ program would  rename
  3338.     these variables as follows:
  3339.  
  3340.          PHONE
  3341.          PHONE&
  3342.          PHONE&&
  3343.          PHONE&&&
  3344.          PHONE&&&&
  3345.  
  3346.     Note that the  first occurence of  PHONE was left  unaltered.  Also note
  3347.     that  there  is  a  31-character  maximum  for a variable name.  If your
  3348.     variable names  are close  to this  limit, DADUNIQ  may fail  because it
  3349.     would append invisible  characters to the  name bringing it  beyond this
  3350.     31-character  maximum.   If  this  happens,  DADUNIQ will issue an error
  3351.     message and quit.  You  must then edit the  variable names in your  text
  3352.     editor to fix the problem, and re-create the dictionaries.
  3353.  
  3354.     While  listing  the  variable  names  in  DFD,  there will be no obvious
  3355.     difference in appearance  of duplicate variable  names to you.   This is
  3356.     because the variable names are appended to with invisible characters  by
  3357.     DADUNIQ, so you will not see any difference.
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.  
  3365.  
  3366.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  3367.  
  3368.  
  3369.  
  3370.     DFD Demo - Walking Through the Demo                            Page  A-1
  3371.  
  3372.  
  3373.  
  3374.                             Walking Through the Demo
  3375.  
  3376.     Since Turbo Pascal is so popular these days, we've decided to do a  demo
  3377.     using that language.  Please note that you do not need the Turbo  Pascal
  3378.     compiler or any of the Turbo Pascal system to perform this demo.
  3379.  
  3380.     Make sure you've copied the  distribution diskette to a subdirectory  on
  3381.     your fixed disk.  You should be in that subdirectory of your fixed  disk
  3382.     while doing this demo.
  3383.  
  3384.     We've set up a  source record layout in  a file called DEMO.REC  and the
  3385.     database described by this record  layout is contained in a  file called
  3386.     DEMO.DB (this is  the data file  or database file  with all the  data in
  3387.     it).
  3388.  
  3389.     If you copy the file DEMO.REC to your printer, you'll find that it looks
  3390.     like the copy of the file on  the following page.  Print a copy of  this
  3391.     file out on your  printer by entering the  following on the DOS  command
  3392.     prompt:
  3393.  
  3394.  
  3395.              COPY  DEMO.REC  PRN
  3396.  
  3397.     You will need it for the demo.
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  3430.  
  3431.  
  3432.  
  3433.     DFD Demo - Walking Through the Demo                            Page  A-2
  3434.  
  3435.  
  3436.  
  3437.          { Gilmore Systems demo source for a hypothetical car salesperson }
  3438.  
  3439.          { The following #START_SET and #END_SET defines tag names }
  3440.  
  3441.          {#START_SET}
  3442.  
  3443.          YEAR=1960..1987;
  3444.          CARPET_TYPE=1..4;
  3445.          LOCATION=1..2;
  3446.          PREFERENCE=1..2;
  3447.  
  3448.          {#END_SET}
  3449.  
  3450.          Optionrec = record
  3451.                      air        : string[3]; { Yes/No for Air Conditioning }
  3452.                      stereo     : string[3]; { Yes/No for Stereo Radio }
  3453.                      powerstr   : string[3]; { Yes/No for Power Steering }
  3454.                      powerbrk   : string[3]; { Yes/No for Power Brakes }
  3455.                      powerwnd   : string[3]; { Yes/No for Power Windows }
  3456.                      carpeting  : array[CARPET_TYPE] of string[3]; { Carpet}
  3457.                    end;
  3458.  
  3459.          Carrec = record
  3460.                   make     : string[20];     { Manufacturer of car }
  3461.                   qty_left : array[YEAR] of integer;  { Year of car }
  3462.                   model    : string[20];     { Model name of car }
  3463.                   options  : Optionrec;      { Options Information }
  3464.                   color    : string[10];     { Color of car }
  3465.                 end;
  3466.  
  3467.          Namerec  = record
  3468.                     lastname   : string[20];  { Customer's Last Name }
  3469.                     firstname  : string[20];  { Customer's First Name }
  3470.                     middleInit : char;        { Customer's Middle Initial }
  3471.                   end;
  3472.  
  3473.          Addressrec = record
  3474.                       street  : string[20];   { Customer's Street Address }
  3475.                       city    : string[20];   { Customer's City }
  3476.                       state   : string[2];    { Customer's State }
  3477.                       zip     : string[10];   { Customer's Zip code }
  3478.                     end;
  3479.  
  3480.          Phonerec = record
  3481.                     area_code  : string[3];   { Customer's area code }
  3482.                     ph_number  : string[10];  { Customer's phone number }
  3483.                   end;
  3484.  
  3485.          PriceRec = record
  3486.                     lowest  : real;  { Lowest price customer wants }
  3487.                     highest : real;  { Highest price customer wants }
  3488.                   end;
  3489.  
  3490.  
  3491.  
  3492.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  3493.  
  3494.  
  3495.  
  3496.     DFD Demo - Walking Through the Demo                            Page  A-3
  3497.  
  3498.  
  3499.          Customer = record
  3500.                     name        : Namerec;    { Customer Name info }
  3501.                     address     : Addressrec; { Customer Address info }
  3502.                     phone       : array[LOCATION] of Phonerec; { Phone }
  3503.                     car         : array[PREFERENCE] of Carrec; { Car }
  3504.                     PriceRange  : PriceRec;
  3505.                     LastContact : string[9];   { Date last contacted }
  3506.                   end;
  3507.  
  3508.  
  3509.  
  3510.  
  3511.  
  3512.  
  3513.  
  3514.  
  3515.  
  3516.  
  3517.  
  3518.  
  3519.  
  3520.  
  3521.  
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.  
  3539.  
  3540.  
  3541.  
  3542.  
  3543.  
  3544.  
  3545.  
  3546.  
  3547.  
  3548.  
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  3556.  
  3557.  
  3558.  
  3559.     DFD Demo - Walking Through the Demo                            Page  A-4
  3560.  
  3561.  
  3562.  
  3563.     After observing the record layout,  you'll notice that there is  no code
  3564.     in the file - purely RECORD descriptions.  This is all DFD needs to know
  3565.     about.  To  make a  DAD (Data  Dictionary) out  of this,  it is a 2-step
  3566.     process.  For the first step, you'll  need to know the name of  the main
  3567.     record.   In  this  example,  it  is  obviously "Customer", so enter the
  3568.     following at the DOS command prompt:
  3569.  
  3570.          PASSCAN  DEMO.REC  CUSTOMER
  3571.  
  3572.     PASSCAN starts the Pascal  Scanner program.  DEMO.REC tells  the scanner
  3573.     program that this is the name of the source record layout file for it to
  3574.     scan, and CUSTOMER tells it that this is the name of the main record.
  3575.  
  3576.     PASSCAN will now scan the  DEMO.REC file and build an  intermediate file
  3577.     called DEMO.RRR which will be used as input to the DAD builder  program.
  3578.     When PASSCAN finishes, you will invoke the DAD builder for Turbo  Pascal
  3579.     with the following at the DOS command prompt:
  3580.  
  3581.           TPAS2DAD  DEMO
  3582.  
  3583.     Note that no filename extension  is supplied here since TPAS2DAD  (Turbo
  3584.     Pascal to  DAD) automatically  looks for  a file  with the  extension of
  3585.     ".RRR".  If TPAS2DAD  finds any errors,  it will issue  an error message
  3586.     with the line number of the  line in question.  This line number  refers
  3587.     to the  line in  the ".RRR"  (DEMO.RRR in  this case)  file in question.
  3588.     From there you can extrapolate the line in question in your main file.
  3589.  
  3590.     When TPAS2DAD finishes, it will have created the following three files:
  3591.  
  3592.          DEMO.DAD  -  The data dictionary
  3593.          DEMO.TAD  -  The tag dictionary
  3594.          DEMO.KAD  -  The comment dictionary
  3595.  
  3596.     and show you the size of each of the records in the file:
  3597.  
  3598.          record 1 "optionrec" = 36 bytes
  3599.          record 2 "carrec" = 145 bytes
  3600.          record 3 "namerec" = 43 bytes
  3601.          record 4 "addressrec" = 56 bytes
  3602.          record 5 "phonerec" = 15 bytes
  3603.          record 6 "pricerec" = 12 bytes
  3604.          record 0 "customer" = 441 bytes
  3605.  
  3606.     Record 0 is always the main record.  The other records start with 1  and
  3607.     appear in the order they were encountered.
  3608.  
  3609.     Now you can  go ahead and  start the DFD  program.  Before you  do, make
  3610.     sure your printer is online and  ready to receive data since we  will be
  3611.     using the printer later in this demo.
  3612.  
  3613.     To start the DFD program, simply enter the following at the DOS  command
  3614.     prompt:
  3615.  
  3616.  
  3617.  
  3618.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  3619.  
  3620.  
  3621.  
  3622.     DFD Demo - Walking Through the Demo                            Page  A-5
  3623.  
  3624.  
  3625.          DFD
  3626.  
  3627.     In a  few seconds,  the DFD  display screen  will appear  and will  look
  3628.     similar to this:
  3629.  
  3630. ┌───[ Data File Debugger (DFD) - (C)Copyright 1986, 1987 - Gilmore Systems ]───┐
  3631. │Dictionary01:         Data:                                                   │
  3632. │Dictionary02:         Data:                                                   │
  3633. │Dictionary03:         Data:                                                   │
  3634. │Dictionary04:         Data:                                                   │
  3635. │Dictionary05:         Data:                                                   │
  3636. │Dictionary06:         Data:                                                   │
  3637. │Dictionary07:         Data:                                                   │
  3638. │Dictionary08:         Data:                                                   │
  3639. │Dictionary09:         Data:                                                   │
  3640. │Dictionary10:         Data:                                                   │
  3641. │Dictionary11:         Data:                                                   │
  3642. │Dictionary12:         Data:                                                   │
  3643. │Dictionary13:         Data:                                                   │
  3644. ├─[F1=Help  F2=Continue  F3=Swap  F4=Clear  F9=DOS  F10=Quit]──────────────────┤
  3645. │Dict#:   #Data Records:        Rec:       │ Tag (     )     Dimens ( )   Subsc│
  3646. │Varname:                                  │1                                  │
  3647. │Rec(     )                                │2                                  │
  3648. │Ref(     )                                │3                                  │
  3649. │Type:                Language:            │4                                  │
  3650. │Length:       Sequence Number:            │5                                  │
  3651. │Main Offset:      Record Offset:          │6                                  │
  3652. ├────────────────────────────────[ D  A  T  A ]────────────────────────────────┤
  3653. │                                                                              │
  3654. └───────────────────────────[                      ]───────────────────────────┘
  3655.  
  3656.     When  this  screen   appears,  the  cursor   will  be  located   at  the
  3657.     "Dictionary01:" prompt  field.  You  are to  enter the  word "DEMO" here
  3658.     since this is the  dictionary you are working  with.  Hit the ENTER  key
  3659.     after typing "DEMO" and  the cursor will now  be located at the  "Data:"
  3660.     prompt on the same line.  Here  you will respond with "DEMO.DB" and  hit
  3661.     ENTER.  The  cursor will  now move  to the  "Dictionary02:" prompt.  You
  3662.     could enter up  to 13 dictionaries  and 13 database  files, but for  now
  3663.     we'll work with  one.  Note that  if you want  to go back  to a previous
  3664.     field, hit the BACKTAB (Hold Shift will pressing TAB) key and the cursor
  3665.     will move to the previous field.
  3666.  
  3667.     After you've  entered "demo"  and "demo.db"  as outlined  above, hit the
  3668.     function key F2. DFD  will now pause a  couple of seconds to  see if the
  3669.     entries are all valid.  Once this is done, the cursor will be located at
  3670.     the  "Dict#:"  prompt.   This  is  where  you  tell  DFD which DAD (Data
  3671.     Dictionary) you want to work with.   Since we only have one entered  for
  3672.     now,  choose  1  (for  Dictionary01)  and  hit ENTER.  DFD will now load
  3673.     dictionary #1 ("demo"  in this case),  print the number  of data records
  3674.     the database file ("demo.db") has,  and locate the cursor at  the "Rec:"
  3675.     prompt.
  3676.  
  3677.     The "Rec:" prompt  asks you which  data record in  the file you  want to
  3678.     work with.  There are 5 data  records in the "demo.db" file, and  so you
  3679.  
  3680.  
  3681.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  3682.  
  3683.  
  3684.  
  3685.     DFD Demo - Walking Through the Demo                            Page  A-6
  3686.  
  3687.  
  3688.     would choose a number from 0 to 4 (the first record is 0, the second  is
  3689.     1,  ...the  fifth  is  4).   Enter  "0" (without quotes).  After hitting
  3690.     ENTER, DFD takes you to a new screen listing the references and variable
  3691.     names in the main record.
  3692.  
  3693.     This screen is the variable  selection screen.  If you're using  a color
  3694.     monitor, note  that the  record name  is in  magenta, references  are in
  3695.     green, and member names of variables  are in brown.  DFD will not  allow
  3696.     you to choose a RECORD since you're already there.  Use the up and  down
  3697.     cursor (arrow) keys  to move about  the variable selection.   As you hit
  3698.     the down cursor key, note that the display highlights the variable  name
  3699.     you're  on  (If  no  highlighting  occurs, adjust your brightness and/or
  3700.     contrast knobs on the display until it does).
  3701.  
  3702.     Use the  cursor keys  to get  the ADDRESS  field highlighted.  When this
  3703.     field is highlighted hit ENTER.  Since ADDRESS is a REFERENCE to another
  3704.     RECORD, that other RECORD (ADDRESSREC) gets displayed.  ADDRESSREC is  a
  3705.     SUBRECORD of the  CUSTOMER record.  It's  members (in brown)  are listed
  3706.     below  it.   From  looking  at  the  source  code,  ADDRESSREC  does not
  3707.     reference any other records in it, it simply has four members of  STRING
  3708.     data types.   Use the  arrow keys  to select  the CITY  variable and hit
  3709.     ENTER.
  3710.  
  3711.     The DFD display screen will  now return with all the  information fields
  3712.     filled in,  and  the D A T A field  will contain the  data it found  for
  3713.     CUSTOMER[0].ADDRESSREC.CITY which  will be  "Boston" in  this case.  The
  3714.     cursor will be located under the  first character of the string, or  "B"
  3715.     in this  case.  You  can now  edit this  data by  simply typing over it.
  3716.     While you are editting  data, a few other  keys are available to  you as
  3717.     follows:
  3718.  
  3719.          Esc   - Blank out the data field
  3720.          Del   - Delete character under cursor
  3721.          Ins   - Toggle insert mode off/on
  3722.          Home  - Move cursor to beginning of field
  3723.          End   - Move cursor to end of field
  3724.          ENTER - Accept update (immediately updates database file)
  3725.          F2    - Same as ENTER
  3726.          F4    - cancels data entry for this variable
  3727.          BACKTAB (Shift+Tab) - same as F4
  3728.  
  3729.     Change "Boston" to  "Cambridge" and hit  ENTER.  The update  is accepted
  3730.     and immediately performed and the cursor is located back at the "Dict#:"
  3731.     prompt.  Since  we still  want to  work with  the same dictionary, (#1),
  3732.     simply  hit  ENTER.   The  cursor  should  now  be located at the "Rec:"
  3733.     prompt.  Enter "0"  (without quotes) again  to get the  variable list on
  3734.     the  screen.   Select  ADDRESS  again  and  then select CITY again.  DFD
  3735.     should now return with the contents of the database for this field  with
  3736.     "Cambridge",  this  verifies  that  the  change  did  indeed take place!
  3737.     Simply hit ENTER or F4 to  get back to the "Dict#:" prompt.   Keep using
  3738.     Dictionary01.
  3739.  
  3740.     Get the  cursor back  to the  "Rec:" prompt  again.  Note  that when the
  3741.     cursor is at the  "Rec:" prompt, you could  return back to the  "Dict#:"
  3742.  
  3743.  
  3744.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  3745.  
  3746.  
  3747.  
  3748.     DFD Demo - Walking Through the Demo                            Page  A-7
  3749.  
  3750.  
  3751.     prompt by hitting BACKTAB (Shift+Tab).
  3752.  
  3753.     Get the cursor  back to the  "Rec:" prompt once  again.  Enter a  1 this
  3754.     time instead of 0.  Go  through the variable selection screens  as above
  3755.     to choose ADDRESS and CITY again.  The DFD screen should come back  with
  3756.     "Detroit" this time  since that's what  it found in  the database file's
  3757.     2nd data record.
  3758.  
  3759.     Get the cursor back to the "Rec:" prompt one more time.  Enter a 0  this
  3760.     time.  Move the selection  back to ADDRESS again  and hit F1. Note  that
  3761.     the bottom of the selection  screen contains the comment found  for this
  3762.     reference.  You can modify the comment or simply hit ESC to get back  to
  3763.     the selection process.  Now move  the selection to PHONE (PHONE  will be
  3764.     highlighted when you get there).  Select this field by hitting ENTER and
  3765.     note what happens!  Looking at the source code, PHONE is a 1-dimensional
  3766.     variable whose subscript range is described by a tag called LOCATION  (a
  3767.     tag is not  a variable name,  it is simply  to help you  remember what a
  3768.     subscript is used for).  The customer in this record can have two  phone
  3769.     numbers and DFD is asking which one you want.  Type "1" (without quotes)
  3770.     and hit ENTER.   DFD will now  display the PHONEREC  variables.  Use the
  3771.     cursor keys to get PH  NUMBER highlighted (Note DFD removes  underscores
  3772.     to promote readibility) and select it by hitting ENTER.  DFD will return
  3773.     to the main display screen again with the  D A T A  field filled in with
  3774.     "555-1234".
  3775.  
  3776.     Get the cursor  back to the  "Rec:" prompt once  again.  Enter a  3 this
  3777.     time  (for  the  4th  data  record).   In the variable selection screen,
  3778.     select CAR (get the CAR field  highlighted by using the down cursor  key
  3779.     and hit ENTER).  Note that CAR is a 1-dimensional array of type  CARREC.
  3780.     ENTER  a  "1"  (without  quotes)  and  the  CARREC subrecord will now be
  3781.     displayed.  Note that  on this screen,  OPTIONS is in  green (indicating
  3782.     that it is a  REFERENCE to another record).   Select the QTY LEFT  field
  3783.     (get QTY LEFT highlighted by using  the down cursor key and hit  ENTER).
  3784.     DFD returns  with the  familiar main  screen, but  since QTY  LEFT is  a
  3785.     dimensioned variable, the  "Tag" and "Dimens"  fields are filled  in and
  3786.     the cursor  is awaiting  a response  to the  subscript you  want to work
  3787.     with.  Enter 1980 (type 1980 and  hit ENTER).  DFD will now display  the
  3788.     data found for CUSTOMER[3].CAR[1].QTY_LEFT[1980]  which should be a  "9"
  3789.     (The dealer has 9 of these 1980 model cars left).
  3790.  
  3791.     Now let's try dumping the database file to your printer.  Make sure your
  3792.     printer is online and has plenty  of paper.  Get the cursor back  to the
  3793.     "Rec:" prompt once again, only this time enter "/D" (without quotes)  by
  3794.     typing a slash (/)  and the letter D  (D) and hit ENTER.   DFD will come
  3795.     back with a "?".  This is DFD's way of asking you which data record  you
  3796.     want to dump.  Respond by typing the digit "2" (without quotes) and  hit
  3797.     ENTER.  DFD  will now  dump this  data record  to the  printer.  If  you
  3798.     wanted to dump the entire database  to the printer you would respond  to
  3799.     the "?" prompt with "0+" (without quotes) and hit ENTER.  A dump of  the
  3800.     entire database  file for  this demo  database would  be about  10 pages
  3801.     long.
  3802.  
  3803.     Feel free to play  with all the variables  you like and get  comfortable
  3804.     with  DFD.  This   has  been  a   very  small  demonstration   of  DFD's
  3805.  
  3806.  
  3807.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  3808.  
  3809.  
  3810.  
  3811.     DFD Demo - Walking Through the Demo                            Page  A-8
  3812.  
  3813.  
  3814.     capabilities.  Just enough to get you started with the basics which  may
  3815.     be  all  you'll  ever  use.   As  you  learn other commands and advanced
  3816.     features, you'll find DFD's use even more invaluable.
  3817.  
  3818.     If you happen to be using  Turbo Pascal version 3.01, there is  a sample
  3819.     program called CALC.PAS and a database file called CALCDEMO.MCS that  is
  3820.     supplied on the Turbo System Diskette.   If you'd like to play with  the
  3821.     CALCDEMO.MCS database  file in  DFD, you  can make  a DAD  out of  it by
  3822.     entering the following source record layout with your text editor:
  3823.  
  3824.               CellRec = Record
  3825.                         CellStatus : byte;
  3826.                         Contents   : string[70];
  3827.                         Value      : real;
  3828.                         DEC        : byte;
  3829.                         FW         : byte;
  3830.                       end;
  3831.  
  3832.     If you  compare this  with the  original source  code definition  of the
  3833.     file, be sure  to note how  all data declarations  have been reduced  to
  3834.     simple scalar data types.
  3835.  
  3836.     Save  the  above  layout  into  a  filename,  say CALC.REC and start the
  3837.     scanner:
  3838.  
  3839.          PASSCAN  CALC.REC  CELLREC
  3840.  
  3841.     Next, create the DAD:
  3842.  
  3843.          TPAS2DAD  CALC
  3844.  
  3845.     The  next  time  you  use  DFD,  supply  CALC  as  a dictionary name and
  3846.     CALCDEMO.MCS as the data file name and you're in business!
  3847.  
  3848.  
  3849.  
  3850.  
  3851.  
  3852.  
  3853.  
  3854.  
  3855.  
  3856.  
  3857.  
  3858.  
  3859.  
  3860.  
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  3871.  
  3872.  
  3873.  
  3874.     Index                                                          Page  B-1
  3875.  
  3876.  
  3877.  
  3878.                                      - " -
  3879.  
  3880.     "?" ................. 3-6, 4-1, 4-2, 4-7, A-7
  3881.  
  3882.                                      - * -
  3883.  
  3884.     *** data record ..... 4-5
  3885.  
  3886.                                      - / -
  3887.  
  3888.     /d .................. 3-6, 4-1, 4-2, 4-7, A-7
  3889.     /f .................. 4-1, 4-2
  3890.     /i .................. 4-1, 4-2
  3891.     /m .................. 4-1, 4-2
  3892.     /z .................. 3-6, 4-3, 4-7
  3893.  
  3894.                                      - 3 -
  3895.  
  3896.     31-character limit .. 2-11, 2-24
  3897.  
  3898.                                      - A -
  3899.  
  3900.     Align ............... 2-10
  3901.  
  3902.                                      - B -
  3903.  
  3904.     Brown ............... 3-6, A-6
  3905.  
  3906.                                      - C -
  3907.  
  3908.     Case ................ 1-1, 1-2, 2-2, 2-3, 2-4, 2-10, 2-12, 2-17, 2-18,
  3909.                           3-1, 3-4, 3-9, A-6
  3910.     Color ............... 1-3, 3-6, A-2, A-6
  3911.     Comments ............ 1-2, 2-3, 2-6, 2-13, 2-16, 2-19, 5-3, 5-4
  3912.  
  3913.                                      - D -
  3914.  
  3915.     Dad builder ......... 2-1, 2-6, 2-10, 2-13, 2-14, 2-19, 2-23, 3-1, A-4
  3916.     Data types .......... 1-4, 2-3, 2-4, 2-5, 2-12, A-6, A-8
  3917.     Declaration ......... 2-16, 5-5
  3918.     Delimiters .......... 2-13, 4-4
  3919.     Descriptive names ... 2-20
  3920.     Directives .......... 2-6, 2-7, 2-8, 2-20, 2-21
  3921.     Duplicate ........... 1-4, 2-11, 2-24, 5-1, 5-6
  3922.  
  3923.                                      - E -
  3924.  
  3925.     Edit ................ 2-2, 2-14, 4-3, 4-5, 4-6, 5-6, A-6
  3926.  
  3927.                                      - F -
  3928.  
  3929.     Fixed length ........ 2-16
  3930.  
  3931.  
  3932.  
  3933.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  3934.  
  3935.  
  3936.  
  3937.     Index                                                          Page  B-2
  3938.  
  3939.  
  3940.                                      - G -
  3941.  
  3942.     Green ............... 3-6, 5-2, A-6, A-7
  3943.  
  3944.                                      - H -
  3945.  
  3946.     Header .............. 3-4
  3947.  
  3948.                                      - I -
  3949.  
  3950.     Ieee ................ 1-1
  3951.     Invisible characters  2-11, 2-24, 5-6
  3952.  
  3953.                                      - L -
  3954.  
  3955.     Lstring ............. 2-3, 2-12, 3-9
  3956.  
  3957.                                      - M -
  3958.  
  3959.     Magenta ............. 3-6, 5-2, A-6
  3960.     Member .............. 1-4, 2-11, 2-24, 3-6, 3-7, 5-2, 5-6, A-6
  3961.  
  3962.                                      - N -
  3963.  
  3964.     Nested .............. 1-1, 1-2, 2-3, 2-6, 2-16, 2-19
  3965.     Null ................ 2-15, 2-16, 3-3
  3966.     Null-terminated ..... 2-15
  3967.  
  3968.                                      - O -
  3969.  
  3970.     Offset .............. 2-13, 3-4, 5-3, 5-4, 5-5
  3971.     Offsets ............. 1-1, 2-1, 2-13, 5-3, 5-4
  3972.  
  3973.                                      - P -
  3974.  
  3975.     Protection .......... 2-6, 2-19
  3976.  
  3977.                                      - R -
  3978.  
  3979.     Random .............. 1-1, 2-1, 3-4
  3980.     Random files ........ 1-1
  3981.     Reals ............... 3-9
  3982.     Record .............. 1-1, 1-2, 2-1, 2-2, 2-3, 2-4, 2-7, 2-8, 2-9, 2-10,
  3983.                           2-12, 2-15, 2-16, 2-17, 3-2, 3-4, 3-6, 4-2, 4-4,
  3984.                           4-5, 4-6, 4-7, 5-3, 5-4, 5-5, A-1, A-2, A-3, A-4,
  3985.                           A-5, A-6, A-7, A-8
  3986.     Record layout ....... 1-1, 2-1, 4-6, A-1, A-4, A-8
  3987.     Redirect ............ 5-3, 5-5
  3988.     Reference ........... 2-3, 2-4, 2-15, 2-16, 3-6, 5-5, 5-6, A-6, A-7
  3989.  
  3990.                                      - S -
  3991.  
  3992.     Scalar .............. 2-2, 2-4, 2-6, 2-12, 2-14, 2-19, A-8
  3993.     Scanner ............. 1-4, 2-1, 2-2, 2-3, 2-4, 2-6, 2-8, 2-9, 2-14,
  3994.  
  3995.  
  3996.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  3997.  
  3998.  
  3999.  
  4000.     Index                                                          Page  B-3
  4001.  
  4002.  
  4003.                           2-16, 2-19, 2-21, 2-22, 4-6, A-4
  4004.     Set ................. 2-7, 2-8, 2-14, 2-20, 2-21, A-1
  4005.     Source .............. 1-1, 1-4, 2-1, 2-2, 2-7, 2-9, 2-13, 2-14, 2-17,
  4006.                           2-20, 2-22, 3-6, 4-2, 4-6, 4-7, 5-1, 5-3, 5-4,
  4007.                           5-6, A-1, A-2, A-4, A-6, A-7, A-8
  4008.     Strings ............. 1-1, 2-12, 2-15, 2-20, 4-4, 4-6
  4009.     Struct .............. 1-1, 1-2, 2-1, 2-14, 2-15, 2-16, 2-17, 2-18, 2-20,
  4010.                           2-21, 2-22, 2-23
  4011.     Struct { ............ 2-16, 2-17, 2-18, 2-23
  4012.     Subscript ........... 2-3, 2-7, 2-8, 2-16, 2-21, 4-1, 4-2, A-7
  4013.     Syntax .............. 2-1, 2-2, 2-3, 2-4, 2-9, 2-16, 2-18, 2-22, 4-7,
  4014.                           5-1, 5-2
  4015.  
  4016.                                      - T -
  4017.  
  4018.     Tag ................. 1-1, 2-1, 2-3, 2-7, 2-8, 2-9, 2-20, 2-21, 2-22,
  4019.                           3-2, 4-2, 5-3, 5-5, A-2, A-4, A-5, A-7
  4020.  
  4021.                                      - U -
  4022.  
  4023.     Union ............... 1-2, 2-14, 2-16, 2-17, 2-18, 2-23
  4024.     Union { ............. 2-16, 2-17, 2-18, 2-23
  4025.     Unique .............. 1-1, 1-4, 2-11, 2-24, 5-1, 5-6
  4026.  
  4027.                                      - V -
  4028.  
  4029.     Variant ............. 2-2, 2-14, 2-17, 2-18
  4030.  
  4031.                                      - Z -
  4032.  
  4033.     Zstring ............. 2-14, 2-15, 2-20, 2-21, 2-22
  4034.  
  4035.  
  4036.  
  4037.  
  4038.  
  4039.  
  4040.  
  4041.  
  4042.  
  4043.  
  4044.  
  4045.  
  4046.  
  4047.  
  4048.  
  4049.  
  4050.  
  4051.  
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059.             DFD User Guide - (C)Copyright Gilmore Systems - 1986, 1987, 1988
  4060.  
  4061.